Kbase P162508: How to allow UltraGrid alternate line shading to be toggled on and off by the user
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/9/2010 |
|
Status: Unverified
GOAL:
How to allow UltraGrid alternate line shading to be toggled on and off by the user
GOAL:
How end users can control UltraGrid alternate line shading using a button
FACT(s) (Environment):
Windows
OpenEdge 10.2x
FIX:
The primary background color of UltraGrid rows is controlled by the DisplayLayout:Override:RowAppearance:BackColor property. The background color of alternate lines can be controlled separately by the DisplayLayout:Override:RowAlternateAppearance:BackColor property. Setting these two properties to the same color or different colors has the effect of toggling alternate row shading on or off.
End users can be given control over whether alternate lines are shaded in an UltraGrid by providing a button for them to click to change the background color of alternate rows. RowAlternateAppearance:BackColor can then be changed in the button's Click event handler based on its current value to toggle alternate row shading on or off.
In the following example of the button Click event handler, the color used for alternate row shading is LightSkyBlue.
/*
If the alternate row background color is the same as the primary row background color, apply the LightSkyBlue color to the alternate rows. Otherwise, set the alternate row background color to match the primary row background color.
*/
IF (ultraGridCustomer:DisplayLayout:Override:RowAlternateAppearance:BackColor:Equals
(ultraGridCustomer:DisplayLayout:Override:RowAppearance:BackColor)) THEN:
ultraGridCustomer:DisplayLayout:Override:RowAlternateAppearance:BackColor =
System.Drawing.Color:LightSkyBlue.
ELSE
ultraGridCustomer:DisplayLayout:Override:RowAlternateAppearance:BackColor =
ultraGridCustomer:DisplayLayout:Override:RowAppearance:BackColor.