Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids with containers
Message
From
12/07/2001 14:44:50
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00528028
Message ID:
00529909
Views:
14
Yes! I tried this - it's a good solution.
Thank you

Since you are doing so well how about this problem <g>:

My grid column contains two controls - a container (that contains a textbox), and another separate textbox, and use DynamicCurrentControl to ensure that the container only shows for the current record. This works ... but ... the textbox inside the container does not seem to get focus correctly. I have had to put a container.SetFocus() in the grid's AfterRowColChange() to set it explicity, this does work but slows scrolling down a lot and also causes the control to flicker. Any suggestions?

Many thanks for you help
David


>Hi!
>
>There is DoScroll method in grid. Just check, if user press up arrow and RelativeRow=1 (grid should be focused), than doscroll it 1 line (like an up arrow pressed in scrollbar), than skip -1. As opposite, when RelativeRow >= (Grid.Height-Grid.HeaderHeigh-{Hor.ScrollBarHeight})/Grid.RowHeight, DoScroll it forward than Skip.
>
>HTH.
>
>>Thank you that works well.
>>
>>There is a cosmetic problem - if you have lots of records and scroll down the table then hold down the up arrow key to scroll back upwards the scrolling in the grid is not smooth, it jumps about. The highlighted record does not remain at the top of the grid - I can live with this I think.
>>
>>David
>>
>>>Hi!
>>>
>>>Just define a code in the KeyPress event that skips to next/previous record in the grid's record source when up/down arrow pressed, than refresh the grid.
>>>
>>>>I would like to use a container control in a grid column but it then makes the up and down arrows behave like the left and right arrows when attempting to navigate up and down in the column with the container in it (i.e. focus moves to the previous or next column) - is there a way round this?
>>>>
>>>>NB For the sake of this discussion say that the container just contains one textbox.
>>>>
>>>>Many thanks
>>>>
>>>>David
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform