title: WinForms ListView display different between WinXP and Win7
body: <p>The line of code below produces a list view that looks different depending on the operating system on which the WinForms application is run.</p>
  
  <pre><code>//both State and UserName are String types
  listView_members.Items.Add("[" + uulm.State + "] " + uulm.UserName);
  </code></pre>
  
  <p>On WinXP, dev system + laptop, I get the proper display of "[State] user". While on Win7, tried one laptop, the application displays "State] user]"</p>
  
  <p>Anyone have any idea how that can happen?</p>
  
  <p>Update:</p>
  
  <p>There was an answer provided but it was removed. Anyway the problem is in setting the RightToLeft property which is not the right thing do to. One way to achieve Right-to-left alignment of Items in a ListView is to set OwnerDraw and handle at least the DrawItem event. A similar question whose answer applies here can be found at: <a href="https://stackoverflow.com/questions/7103798/c-sharp-listview-and-righttoleft">C# ListView and RightToLeft</a></p>