RibbonGetProp Method (WINDOW)


PLBCMP GUI Only, 9.6

 

The RibbonGetProp method returns a property of a ribbon or element in a ribbon. This method only provides properties for the currently active ribbon of a WINDOW object. The method uses the following format:

 

[label]

{object}.RibbonGetProp

[GIVING {return}] USING [*ID=]{id}][:

 

 

*Property={property}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A WINDOW object that is accessed.

return

Optional. A Numeric Variable that indicates the success or failure of the method.

id

Optional. A Numeric Variable or decimal number that identifies the ribbon or ribbon element from which the property is retrieved.

property

Optional. A Numeric Variable or decimal number that identifies the property to be retrieved.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. If the value returned is zero, the ZERO Condition Flag is set.

  2. If {return} is too small to contain a numeric value, the OVER Condition Flag is set.

  3. The EOS flag is set if a returned string is too large to be stored into a Character String Variable without being truncated.

  4. An {id} value of zero identifies the ribbon resource. A non-zero {id} value identifies an element on the ribbon resource.

  5. The {property} value is a unique identifier for the specific property as defined for the ribbon or ribbon element. Properties in the following list have a prefix identifier of "UI_PKEY_". The following properties are supported:
     

  6. Value

    Constant

    This property is used by an application to query ...

    1

    UI_PKEY_Enabled

    whether a control is enabled and able to respond to user interaction.

    2

    UI_PKEY_LabelDescription

    the description associated with a UI_PKEY_Label. The property value is a string constrained to any sequence of characters, including white space and line-break characters. Use the Universal Character Set (UCS) XML character reference 
 to specify a line break.

    3

    UI_PKEY_Keytip

    the keyboard accelerator of a ribbon control. This property value is a string, composed of any sequence of characters including white space. The value of UI_PKEY_Keytip acts as the keyboard accelerator for a Command unless that Command is exposed through a menu item. In this case, the framework ignores the UI_PKEY_Keytip value and instead uses a character preceded by an ampersand as specified by Command.LabelTitle or UI_PKEY_Label. If no ampersand is specified by Command.LabelTitle or UI_PKEY_Label, no keytip or keyboard accelerator is exposed.

    4

    UI_PKEY_Label

    label text of tabs, groups, buttons, gallery items, and other Ribbon controls. The property value is a string constrained to any sequence of characters, including white space and line-break characters. Use the Universal Character Set (UCS) XML character reference 
 to specify a line break.

    5

    UI_PKEY_TooltipDescription

    escription associated with a UI_PKEY_TooltipTitle. The property value is a string constrained to any sequence of characters, including white space and line-break characters.

    6

    UI_PKEY_TooltipTitle

    tooltip of tabs, groups, buttons, gallery items, and other Ribbon controls. The property value is a string constrained to any sequence of characters, including white space and line-break characters. Use the Universal Character Set (UCS) XML character reference 
 to specify a line break.

    104

    UI_PKEY_SelectedItem

    selected item in a gallery control. The property value is the index of the selected item in a collection.

    200

    UI_PKEY_BooleanValue

    itoggle-state of a Check Box, Toggle Button, and the button control of a SplitButtonGallery.

    201

    UI_PKEY_DecimalValue

    ivalue in the edit field of the Spinner control.

    202

    UI_PKEY_StringValue

    is used by an application to query the value in the edit field of the Combo Box control.

    300

    UI_PKEY_FontProperties

    or set all the font properties as a comma delimited string. The format of this string is:

     

    UI_PKEY_FontProperties_Family,

    UI_PKEY_FontProperties_Size,

    UI_PKEY_FontProperties_Bold,

    UI_PKEY_FontProperties_Italic,

    UI_PKEY_FontProperties_Underline,

    UI_PKEY_FontProperties_Strikethrough,

    UI_PKEY_FontProperties_VerticalPositioning,

    UI_PKEY_FontProperties_ForegroundColor,

    UI_PKEY_FontProperties_BackgroundColor,

    UI_PKEY_FontProperties_ForegroundColorType,

    UI_PKEY_FontProperties_BackgroundColorType

    301

    UI_PKEY_FontProperties_Family

    the value of the Font family drop-down gallery. The value of UI_PKEY_FontProperties_Family matches a Windows GDI Font Families name retrieved with the EnumFontFamilies function or EnumFontFamiliesEx function. The default value is an empty string. If an empty string is supplied for the value for UI_PKEY_FontProperties_Family, the font selection is cleared.

    302

    UI_PKEY_FontProperties_Size

    the value of the Font size control. The value is in 1/10 of a point. Valid values for this property range from 1 to 9999 inclusive. If a user tries to enter an invalid value, the entry is rejected and the Font size control reverts to the last valid value. If an application attempts to set font size programmatically to a value outside the valid range, the Ribbon framework invalidates all font properties and sets the font controls (Font size and Font face) to blank or to their default state, where appropriate. The default value is 0. A value of 0 specifies that no single point size is selected (either no text, or a run of dissimilar sized text, is selected).

    303

    UI_PKEY_FontProperties_Bold

    state of the Bold button.

    304

    UI_PKEY_FontProperties_Italic

    state of the Italic button.

    305

    UI_PKEY_FontProperties_Underline

    the state of the Underline button.

    306

    UI_PKEY_FontProperties_Strikethrough

    state of the Strikethrough button.

    307

    UI_PKEY_FontProperties_VerticalPositioning

    ivalue of the Superscript and Subscript controls.

    308

    UI_PKEY_FontProperties_ForegroundColor

    in conjunction with UI_PKEY_FontProperties_ForegroundColorType, Text color gallery settings.

    309

    UI_PKEY_FontProperties_BackgroundColor

    in conjunction with UI_PKEY_FontProperties_BackgroundColorType, Text highlight color gallery settings.

    310

    UI_PKEY_FontProperties_ForegroundColorType

    in conjunction with UI_PKEY_FontProperties_ForegroundColor, color gallery settings. The property value is from the UI_SWATCHCOLORTYPE enumeration. The default value is UI_SWATCHCOLORTYPE_RGB.

    311

    UI_PKEY_FontProperties_BackgroundColorType

    in conjunction with UI_PKEY_FontProperties_BackgroundColor, Text highlight color gallery settings. The property value is from the UI_SWATCHCOLORTYPE enumeration. The default value is UI_SWATCHCOLORTYPE_RGB.

    350

    UI_PKEY_RecentItems

    or associate the object id of a ListView that contains the data for the most recently used (MRU) items collection of the Application Menu. The information for each MRU item is a line item in the ListView object.

    400

    UI_PKEY_Color

    the color value of the DropDownColorPicker control. The property value is a COLORREF value.

    401

    UI_PKEY_ColorType

    color setting of the DropDownColorPicker control. The property value is from the UI_SWATCHCOLORTYPE enumeration:

     

    UI_SWATCHCOLORTYPE_NOCOLOR EQU 0

     

    Application should treat the color setting as transparent. Typically used in conjunction with the No color setting.

     

    UI_SWATCHCOLORTYPE_AUTOMATIC EQU 1

     

    Application should query GetSysColor(COLOR_WINDOWTEXT). Typically used in conjunction with the Automatic color setting.

     

    UI_SWATCHCOLORTYPE_RGB EQU 2

     

    Application should query UI_PKEY_Color for the color setting.

    402

    UI_PKEY_ColorMode

    If the UI_PKEY_ColorMode is set to UI_SWATCHCOLORMODE_MONOCHROME, the RGB value is interpreted as a one-bit-per-pixel pattern.

     

    UI_SWATCHCOLORMODE_NORMAL EQU 0

    UI_SWATCHCOLORMODE_MONOCHROME EQU 1

    403

    UI_PKEY_ThemeColorsCategoryLabel

    the value of the label associated with the Theme Colors category of a DropDownColorPicker.

    404

    UI_PKEY_StandardColorsCategoryLabel

    the value of the label associated with the Standard Colors category of a DropDownColorPicker.

    405

    UI_PKEY_RecentColorsCategoryLabel

    the value of the label associated with the Recent Colors category of a DropDownColorPicker.

    406

    UI_PKEY_AutomaticColorLabel

    the value of the label associated with the Automatic button of a DropDownColorPicker. This button is used by the application to specify a default color as required.

    407

    UI_PKEY_NoColorLabel

    the value of the label associated with the No color button of a DropDownColorPicker.

    408

    UI_PKEY_MoreColorsLabel

    the value of the label associated with the More colors button of a DropDownColorPicker.

    1000

    UI_PKEY_Viewable

    the visible or hidden state of the ribbon UI.

    1001

    UI_PKEY_Minimized

    the collapsed or expanded state of the ribbon UI.

    1002

    UI_PKEY_QuickAccessToolbarDock

    the dock-state of the Quick Access Toolbar (QAT). The property value is from the UI_CONTROLDOCK enumeration:

     

    UI_CONTROLDOCK_TOP EQU 1

     

    The QAT is docked in the nonclient area of the Ribbon host application, as shown in the following screen shot.

     

    UI_CONTROLDOCK_BOTTOM EQU 3

     

    The QAT is docked as a visually integral band below the Ribbon, as shown in the following screen shot.

    2000

    UI_PKEY_GlobalBackgroundColor

    the global background color for a customized ribbon. This color uses HSB (Hue, Saturation, Brightness) values. This color is not a RGB color value.

    2001

    UI_PKEY_GlobalHighlightColor

    the global highlight color for a customized ribbon. This color uses HSB (Hue, Saturation, Brightness) values. This color is not a RGB color value.

    2002

    UI_PKEY_GlobalTextColor

    the global text color for a customized ribbon. This color uses HSB (Hue, Saturation, Brightness) values. This color is not a RGB color value.

     

  7. This method is not available when using the PL/B Web Server.

 

 

See Also: Method Syntax, WINDOW Methods

 



PL/B Language Reference ResetScaleOrigin Method (WINDOW) RibbonSetModes Method (WINDOW)