|
-
Nov 25th, 2005, 01:43 AM
#1
Thread Starter
New Member
save and load colors into flexgrid cells
Dear all,
Do anyone have any ideas on how to save and load colors into flexgrid's cells?
-
Nov 25th, 2005, 12:07 PM
#2
Re: save and load colors into flexgrid cells
Do you mean changing the CellBackColor?
-
Nov 25th, 2005, 12:18 PM
#3
Re: save and load colors into flexgrid cells
Here some examples..
VB Code:
'This will change de CellBackColor of cell 2,2
Private Sub Command1_Click()
With MSFlexGrid1
.Redraw = False 'No redraw while changing colors
.Row = 2
.Col = 2
.CellBackColor = vbGreen 'Paint it green
.Redraw = True 'Redraw again
End With
End Sub
'This will change de CellBackColor of the entire Flexgrid
Private Sub Command2_Click()
With MSFlexGrid1
.Redraw = False 'No redraw while changing colors
.FillStyle = flexFillRepeat 'This will apply to the entire grid
.Row = 1 'the order is important -> Row, Col, Rowsel, Colsel
.Col = 0
.RowSel = .Rows - 1
.ColSel = .Cols - 1
.CellBackColor = vbYellow 'Paint it Yellow
.FillStyle = flexFillSingle 'Restore cell level changes
.Redraw = True 'Redraw again
End With
End Sub
Thats to set the CellbackColor, and the same way, using .Row and .Col you can position in specific cells and get the color with .CellBackColor. This property Sets and Returns the cellbackcolor, then you can Save it somewhere, or Load it from somewhere.
Last edited by jcis; Nov 25th, 2005 at 12:34 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|