Hi All,
Another “hobbiest” question for the brains trust.
I have a window that displays editable pieces of infomation. Now, normally I would use text boxes to display and edit but, for aesthetics (and the excersise) I have done the following:
I use Labels to display the info. Then to edit, I have 1 “hidden” text box. When I click on a label, I make the text box visible, match the left, top and width attributes of the label and copy its text contents into the text box and set the focus.
All that works ok. I then use the keydown event to capture “special” keys. Eg if Esc is pressed, I make the text box invisible and leave everything as is. If Enter is pressed, same except I update the label text.
I also want to capture the if TAB & SHIFT/TAB are pressed to TAB through the labels. This appears simple, I keep track of the Label index and increment/decrement the number and reset the text box appropriately. Problem is, there appears to some some controls that “override” the TAB being acted upon. Eg., I have a radio group control. When I do the above, my text box moves correctly, but then the focus moves to the radio group. Is this an error or is there something I can do? I have set TabStop to off on all controls.
Also, does anyone know how to capture SHIFT/TAB. ASCII 9 is the TAB, but is returned regardless of whether the shift key is pressed to not.
(I hope that all makes sense )
Thanks