General information
Category:
The Mere Mortals Framework
I found a small bug in the When() method of cGridlist, located in kcustctl.vcx. Here's the code:
*---------------------------------------
*--- Set the column controls' BackColor,
*--- ForeColor and SelectedBackColor
*---------------------------------------
FOR lnColumn = 1 TO This.ColumnCount
loControl = EVAL("This.columns[lncolumn]." + This.Columns[lnColumn].CurrentControl)
loControl.BackColor = This.nSelectedBackColor
loControl.ForeColor = This.nSelectedForeColor
loControl.SelectedBackColor = This.nSelectedBackColor
ENDFOR
The problem with the above code is that it assumes that you the currentcontrol supports the SelectedBackColor property. If you are using a checkbox, you will get an error. Currently, there are four controls that support this property: textbox, combobox, editbox and spinner.
I suggest testing the parentclass of loControl before attempting to set the SelectedBackcolor. This can be done with a custom method or simply an if statement. I used a custom method, but Kevin has the final decision on how the framework should deal with this minor problem. Thanks all!
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only