Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting Tabs with-in a single TEXTBOX column in a GRID
Message
From
25/02/1999 10:53:10
 
 
To
24/02/1999 06:53:17
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00189293
Message ID:
00191450
Views:
15
>>Hi,
>> I would like to "Set Tabs" with-in a single
>>"wide" character "TEXTBOX" field in a GRID.
>>When I press the TAB Key now, the cursor jumps
>>to the next field in the GRID.
>>Ideally, I could programmatically set TAB STOPS
>>within this one "TEXTBOX" field for this whole
>>column in the GRID.
>> I would be willing to use another Key Combo
>>(other than TAB) if that would be easier.
>>
>>Thanks,
>>Terry Harris
>
>Here's something that would work for a memo-field. I'm not sure about text boxes.
>
>In the keypress()-event of the textbox, see if it is a TAB-key. If so, don't let it through, and put a CTRL+TAB in the keyboard buffer (with the KEYBOARD command). CTRL+TAB does a TAB within a field.
>
>Another option : make a procedure that is started bij the ON KEY LABEL TAB command. In this procedure, check if you are on the specific text box in the grid, and if so, do a CTRL+TAB.
>
>I suppose it is your intention to make some data line out nicely on the screen or on a report. Then you may have a problem because (in a memo field) you can't control the tab settings (as far as I know).
>
>A (not so nice) solution may be to use a fixed width font for your text box. Then, in the keypress()-event, do the following when TAB is pressed :
>If you are in the beginning of the text box, and there is no data beyond the cursor position, put a number of spaces in the keyboard buffer. (I believe there is a property to see at what character position the cursor is. The length of the data in the field is the length of the .text property or so.) Now the user can type some data at the correct position.
>If there is data beyond the cursor position, move the cursor position to the 'tab'-position. The user can then change the data.
>If you are beyond the 'tab'-position, let the normal TAB happen, so that the cursor jumps to the next field.
>
>Maybe it would be a better idea to use two fields instead.
>
>Hope this helps...
>
>Marc


Thanks Marc for the info. Will try some of this.
Terry Harris
Previous
Reply
Map
View

Click here to load this message in the networking platform