Adding Compact Framework Design-Time Attributes, or More Fun With TextBoxes

A common user-interface feature is to select the contents of a text-box when the textbox gets focus. The CF textbox control doesn’t do this by default but it’s not difficult to add with managed code. While I’m at it, I’ll add a SelectTextOnFocus property to the textbox’s property window so the developer can determine at…

1

Setting Alignment in TextBoxes…No Looking Glass Required

In yesterday’s post I stated that “non-character keys do not trigger KeyPress events.” While that is perfectly true, I misunderstood what was meant by a non-character key. In the non-managed Win32 world, pressing a key generates a WM_KEYDOWN, one or more WM_CHAR messages, and a WM_KEYUP message. The managed KeyPress event corresponds to the WM_CHAR…

0

Setting Alignment in TextBoxes, or Through the Looking Glass

  With a couple of exceptions, the UI controls provided by the .NET Compact Framework are thin wrappers around the controls provided by the operating system.  Perhaps I’m too sanguine, but I expect the basic controls (button, check box, radio button, edit control and list box) to have the same capabilities on both Windows and…

0

Using a hardware key to tab through controls

The question of using a hardware button to tab through the controls on a form came up on the Compact Framework forum.  The answer, while simple, still had a couple of gotcha’s, so I thought I’d give you the benefit of my experience.  If you’re not familiar with the HardwareButton control (Microsoft.WindowsCE.Forms.HardwareButton), it’s a control…

0