On Dec 6, 2006, at 12:21 PM, Guyren Howe wrote:
Using 2K6r4 (tried r5), I want to implement a listbox with
individually-selectedable cells.
I created suitable properties to represent the selection, and I do
this:
Sub CellClick(row, column etc)
Self.SelectedRow = row
Self.SelectedCol = column
Window.Refresh
End Sub
and I have a suitable CellBackgroundPaint method to highlight the
selected cell when it's refreshed.
The trouble is that nothing I do gets the control to refresh
Individually selected cells can also be implemented with code like
this in CellClick:
Self.SelectedRow = row
Self.SelectedColumn = column
// rebuild all the cells to show only the clicked cell highlighted
dim i, j as integer
For i = 0 to me.ListCount - 1
For j = 0 to me.ColumnCount - 1
me.InvalidateCell(i, j)
Next
Next
Return True // to avoid a row highlight
And with code like this in CellBackGroundPaint:
If row < me.ListCount then
If row = self.SelectedRow and column = self.SelectedColumn then
g.ForeColor = HighlightColor
g.FillRect 0,0, g.Width, g.Height
Return True
End
End
Regards,
Jack
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>