PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview
  • Handling the Ribbon control and its groups
  • Handling a Ribbon control
  • Collapsing a Ribbon control
  • Handling a grouping
  • Forcing a grouping to close
  • Properties specific to the Ribbon controls
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
WINDEV allows you to handle a Ribbon control as well as its panes and groupings by programming.
The name of the Ribbon control is used to handle the Ribbon control and its panes by programming.
The name of the grouping is used to handle the grouping by programming.
Note: Going from a pane to another one (when the user clicks the caption of the pane) is automatically managed.
Handling the Ribbon control and its groups

Handling a Ribbon control

To handle a pane of the Ribbon control, use the following syntax:
<Ribbon Name>[PaneNumber]..PropertyName = <Value>
For example, to gray the second pane of the Ribbon control:
RIBBON_Menu[2]..Grayed = True
The first pane of the ribbon is enabled by default. The active pane can be changed by programming:
  • by using the following syntax:
    <Ribbon Name> = <Pane Number>
  • via ..Value.
To find out the number of the active pane, you can:
  • perform a simple assignment:
    <Num Active Pane> = <Ribbon Name>
  • via ..Value.
..Caption is used to find out and modify the caption of the active pane. For example:
Trace(RIBBON_Menu[ActivePane]..Caption)

Collapsing a Ribbon control

..Collapsed is used to collapse (or not) a Ribbon control. If the Ribbon control is collapsed, only the caption of the panes will be displayed (like in a standard menu). The content of the pane is displayed when the user clicks the caption of the pane. If the user clicks the caption of the pane again (or one of the buttons found in the pane), the content of the pane is no longer displayed.
Versions 18 and later
To force the pane disappearance during a user action (when performing a selection in a combo box for example), all you have to do is use RibbonEndExpandedMode.
New in version 18
To force the pane disappearance during a user action (when performing a selection in a combo box for example), all you have to do is use RibbonEndExpandedMode.
To force the pane disappearance during a user action (when performing a selection in a combo box for example), all you have to do is use RibbonEndExpandedMode.

Handling a grouping

The following syntax is used to handle a grouping:
<Ribbon Name>.<Grouping Name>
For example:
RIBBON_Menu.GRITEM_QuickAccess..Visible = False

Forcing a grouping to close

In a Ribbon control, the small groupings display an icon and an arrow used to open a popup that contains all the controls.
By default, this popup is closed:
  • when the user clicks a button,
  • when the user performs a selection in a combo box.
To close the grouping on another action (once 3 characters have been entered for example), use RibbonCloseGrouping in the requested process.
Properties specific to the Ribbon controls
The main properties that can be used with a Ribbon controls are as follows:
CollapsedUsed to collapse (or not) a Ribbon control. If the Ribbon control is collapsed, only the caption of the panes will be displayed. When clicking the caption of the pane, the pane is entirely displayed, with all its groupings.
OccurrenceUsed to find out the number of panes in a Ribbon control.
To find out the entire list of WLanguage properties that can be used with a Ribbon control, see Properties associated with the Ribbon control.
Minimum required version
  • Version 17
Comments
Click [Add] to post a comment