Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Objects like combobox's and spinners in grids?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00065344
Message ID:
00065406
Views:
49
>>>>>>>All the values in the grid show fine but when I enter one of
>>>>>>>these columns the value appears to 'big' to be seen properly
>>>>>>>in the combobox or spinner.
>>>>>>
>>>>>>combo.BorderStyle = 0
>>>>>
>>>>>Thanks Garrett. Works great. Maybe you can help with this problem. All the comboboxes are DropDownList. When the user is in a column with a combobox and they press the uparrow or downarrow I want them to step up and down the rows instead of changing the value of the combo. How do I do this?
>>>>
>>>>My solution was to use the keypress event to capture keystrokes and then do the appropriate skip +1 or skip -1. I have found no problems with this approach. Then the user can move 'up' and 'down' in the list using the left and right arrow keys.
>>>>
>>>>Peter
>>>
>>>There must be more to it than just the appropriate SKIP. Can you please elaborate? Thanks.
>>
>>Thats it. I just did a do case statement to find out which direction (tab,enter,down -> down; shift-tab,up -> up) and then made sure not bof, not eof, and then skipped. There doesn't seem to be any extra refreshing. VFP seems to handle the refreshing itself since the grid has focus.
>>
>>Peter
>
>I used the same code. What happens though is if the user presses uparrow the cursor goes up one row in the grid but the value changes to the value of the row below minus 1. What is the style of your combobox?

You probably need to do a
nodefault
in your keypress event to suppress the normal FoxPro behavior

sorry,
Peter
Peter Stephens
Visual Records, Inc.

Lead Programmer for the general purpose record keeping system Visual Records. Written primarily in VFP 6.0 with a little C++.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform