Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Highlighting Grid Row - weird behavior
Message
 
To
13/12/2000 14:00:18
Mark Ganchrow
Dataware Technology Group, Ltd.
Rochester, New York, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00453006
Message ID:
00453125
Views:
20
Hi Mark,

Download my Grid Highlighter file#9798 in Classes-VCX and forget about your troubles. It does not requre changes to any grid except adding one line of code into AfterRowColChange event.

>I have a two-page (tabbed) Form. Page 1 is the edit/data entry page, and page 2 is a grid/data selection page. The form has a property to indicate that it should open on the grid page, with the grid as the selected object.
>
>The "improper" behavior is as follows:
>When the form opens, the grid is selected, and the first row is highlighted (properly).
>Using the arrow keys to navigate the grid properly results in the row highlight moving to the selected row.
>Using the mouse to click on a different row moves the cursor, but not the row highlight - the original row remains highlighted (although as I'm writing and alt-tabbing back and forth to my app, I see that when I go *back* to the app, the correct row is highlighted).
>Navigating the grid using PageUp and PageDown produces *truly* weird results - like some of the highlight moves, but not all of it; if I'm at the bottom of the visible portion of the grid and page down the contents of the selected row/column changes, but no other data refreshes.
>
>If I click on the Edit page, then back to the grid, all the above weirdness goes away, and the highlighting and page navigation all work as expected.
>
>The highlighting of the grid (which is a class), is done with the following code in the AfterRowColChange event (which I think I got in FPA):
>LPARAMETERS nColIndex
>THIS.nCurrRec = RECNO(THIS.RecordSource)
>THIS.SetAll("DynamicBackColor","IIF( RECNO() = THIS.nCurrRec, RGB(255,255,0), ;
>RGB(255,255,255))","column")
>THIS.Refresh()
>
>I can't think of any property values that might be changing values when the Edit page is selected.
>
>I'll be happy to post additional code, but don't want to overload this question any more than necessary.
>Has anyone got ideas?
>TIA
>Mark
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform