Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid HIGHLIGHTING help please...
Message
From
08/10/2001 21:53:34
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Grid HIGHLIGHTING help please...
Miscellaneous
Thread ID:
00565784
Message ID:
00565784
Views:
56
I have asked this before and have had some great suggestions but it is still acting -wierd- so I thought I'd post it again (or at least what it is doing now.

I am using a GRID like a listbox to list records properly formatted and columnized with headers and different color columns, sorted, etc.

For the most part, it is working well - well enough to be usable, but not well enough that it drives the programmer nuts.

I have the entire grid set for READONLY. I have a method, called MOVEHIGHLIGHT on the form. This method sets a BLUE horizontal backcolor for the current selected row and a green column for the current "sorted" row. That method has:
-------------- movehighlight() -------------------------------
thisform.currowrec=recno()
this.SetAll("DynamicBackColor","IIF(RECNO()=thisform.currowrec,RGB(0,128,255),RGB(255,255,255))","Column")
thisform.grid1.columns(tagno()+2).DynamicBackColor="iif(recno()=thisform.curRowRec,rgb(0,128,255),RGB(0,255,0))"
thisform.refresh()
--------------------------------------------------------------

There is a textbox outside the grid called... txtsearch. Approx 99% of the instancesm this textbox will always have focus as that is where the whole form is driven from.

In the GOTFOCUS of the grid, I have a call to thisform.txtSearch.setfocus. In the GOTFOCUS of the txtSearch I have a call to thisform.movehighlight().

It works, like I said, enough to be passable. But here is the ODD part... when I click on a new row, the cell I clicked in is highlighted by vfp (that is, it has a blue border and the cell is white. The movehighlight does NOT change the background for this cell. When I click on another cell, any other cell, that row highlights completely like it should with NO blue cell outline. Then the next click, outlines the new cell (keeps that cell white), then the next the way I want it, then the next outline/white, etc etc etc.

How come every other click does something different when basically it is doing the same code. I have tried to debug through it but it must be calling something that is "default" normal for VFP and I can't step through that.

Any one have any suggestions?
Peter Brama
West Pointe Enterprises

VFP is getting easier but STILL alot to learn!!
Next
Reply
Map
View

Click here to load this message in the networking platform