CGXProperties::SetUserProperty

void SetUserProperty(WORD nID, const CGXStyle& style);

nID

String resource id with the user property’s name.

style

Specifies the new value/style for the user property.

Remarks

Call this method to change the value of a specific user property.

Normally, the value-attribute for the style object is the specific value.

Example:

// Draw border in current cell
CGXProperties* pProp = GetParam()->GetProperties();
pProp->SetUserProperty(GX_IDS_OUTLINECURRENTCELL,
  CGXStyle().SetValue(pProp->sInvertDrawBorder));

Other settings for outlining the current cell are:

CGXProperties* pProp = GetParam()->GetProperties();
    pProp->SetUserProperty(GX_IDS_OUTLINECURRENTCELL,
       CGXStyle().SetValue(newsetting));

Whereas newsetting can be one of

  • pProp->sInvertNormal – default: invert frame

  • pProp->sInvertThick – invert thick frame

  • pProp->sInvertDrawBorder – draw border (always black)

  • pProp->sInvertThickBorder – draw thick border (always black)

  • pProp->sInvertNoBorder – No border

                                            

There are also possibilities to change the appearance (e.g. background color) for the current cell by overriding GetStyleRowCol. See the FAQ for more info on this.

See Also

 CGXProperties::GetUserProperty  CGXProperties::AddUserProperty

CGXProperties

 Class Overview |  Class Members