Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flexgrid enter_cell event

Status
Not open for further replies.

SimonTheSponge

Programmer
Feb 12, 2001
74
GB
Hi,

I have a grid which I am using as a calender. I highlight certain boxes on the grid which have tasks for that day. The way in which I'm doing this is by setting the .col and .row values and then setting the .cellbackcolor property.

The problem is that setting the .row or .col properties programmatically triggers the enter_cell event which runs some other data retrieval code for when the user moves from cell to cell. I would like to avoid this overhead if I'm just programmatically setting the colour of the Cell.

So I'd like to know, is there a way in which I can set the backcolor of an individual cell without setting the .col and .row properties or can I trap the user entering a cell without using the enter_cell event or any other event triggered by setting the .col and .row values

Thanks

 
The way I do it is to use a variable that informs the event routines not to do anything, something like this:

dim doCellEvents as boolean

sub setwhatever
doCellEvents = false
... ' code to set cells
doCellEvents = true
end sub

sub enter_cell
if not doCellEvents then exit sub
...
end sub

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
I would generally not use the cellenter event because of this and write my own cellenter procedure which I will call when I want to.

PK Odendaal
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top