Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
My Highlighting Grid - cell behaviour
Message
From
26/06/2001 06:54:43
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
 
To
26/06/2001 06:25:25
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00523447
Message ID:
00523451
Views:
19
This message has been marked as a message which has helped to the initial question of the thread.
Mark the problem is not the activecell when you enter on the cell you are realy enter in control of the column so the color that you see is the color settings of the control in the column.
>1. when the grid is not readonly I want the whole row highlighted apart from the current active cell.
for this do nothing.
>
>
>2. When the grid is readonly I want the entire row highlighted including the active cell.
on the gotfocus method of the control put the following code:
IF This.Parent.ReadOnly
This.ForeColor = IIF(RecNo(This.RecordSource) = This.parent.parent.nCurRec,this.parent.parent.cCurRecBackColor,this.parent.parent.BackColor)

>Hello All
>
>I use a simple higlighting grid
>
>In its init method it has the following code.
>
>
>WITH this
>	IF !empty(.RecordSource)
>		.nCurRec = recno(this.RecordSource)
>		.SetAll("DynamicBackColor", "IIF(RecNo(This.RecordSource) = This.nCurRec," + ;
>			str(this.cCurRecBackColor)+","+str(this.BackColor)+")", "Column")
>		.SetAll("DynamicForeColor", "IIF(RecNo(This.RecordSource) = This.nCurRec," + ;
>			str(this.cCurRecForeColor)+","+str(this.ForeColor)+")", "Column")
>	ENDIF
>ENDWITH
>
>
>Apart from this init method there is almost no other code in the class.
>
>When the user enters a cell on this grid the entire row is highlighted apart from the active cell. This is my preferred behaviour when I want my users to edit the grid.
>
>However when this grid is read only I want the entire line to be highlighted including the active cell.
>
>Since I cant figure out why the above code does not highlight the active cell in the first place I am having trouble modifying the code so that it behaves the way I want.
>
>All the fields have their select on entry property set to false so I have ruled this out as the cause.
>
>
>to summarise
>
>1. when the grid is not readonly I want the whole row highlighted apart from the current active cell.
>
>
>2. When the grid is readonly I want the entire row highlighted including the active cell.
>
>
>Many Thanks
Alexandre Palma
Senior Application Architect
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform