Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid.Gotfocus()???
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00143667
Message ID:
00143763
Views:
17
>>Jayesh,
>>
>>Thank you for your reply. What you suggest is essentially what I am doing now.
>>
>>When a control gets focus, the grid's "hasfocus" property to true. When it loses focus, it sets the hasfocus property to false. Then if focus is gained by another control in the grid, the hasfocus property is set to true again.
>>
>>When the grid's hadfocus event is first set to true, the grid is expanded to a height that displays all of the items in the grid up to a maximum of 10 lines, and a timer on the form is set on with an interval of 1 second. If the timer subsequently detects that the hasfocus event has been false for more than 1 second, which would happen if a control outside of the grid had gotten focus, it collapses the grid to one row and turns itself off.
>>
>>I do not like using the timer, and I was hoping someone had thought up a more elegant solution that could be contained within the grid class.
>>
>>regards,
>
>One advantage of sub-classed controls is that it's easy to add code to all the items on a form. I had a grid with the same problem, and ended up putting code to update the grid property in the WHEN clause of all the textboxes. There were only about 10-12 on the page, and I subclassed them from my regular textbox and added the code to the new class.

Barbara,

Now that's a good idea! Thanks

regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Previous
Reply
Map
View

Click here to load this message in the networking platform