Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here are a few options:</p> <ol> <li><p>The easy way is to just create a <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.label%28v=vs.80%29.aspx">label</a> outside the text box (to the left) with those characters. (simple and easy to understand for the user)</p></li> <li><p>Create a second readonly text box to use at the start, style it to match the input one and align them next to each other. Yes, you will get a single pixel line to split them both, but I think this will add to the user experience to make it obvious this is not for messing with (I would personally choose this option)</p></li> <li><p>If you need the style you can <a href="http://msdn.microsoft.com/en-us/library/a6h7e207%28v=vs.71%29.aspx">roll your own user control</a> that uses a panel, label and textbox with appropriate border styling set as needed. (best way to get the exact style you need)</p></li> <li><p>The fourth, more annoying way, would be to handle one of the key events (such as <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.control.keydown.aspx">KeyDown</a>) on the textbox itself. With this you can do numerous checks and alter the caret position to make it work, but trust me this will do your head in trying to get it working perfectly! (way too much hard work to get right)</p></li> </ol> <p>To summarise, I think <strong>option 2</strong> is the best here. Of course if you were using WPF you would undoubtedly have a lot more flexibility in styling.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload