Menu bar — version history
An application menu bar drawn by the library in the application's theme: menus, cascading sub-menus, checkable entries, separators, icons, shortcuts and &File mnemonics. Introduced in 2.0.
4.0 — October 2026 #
New #
is_imageon an entry: its icon can be changed on the fly.is_groupon entries: radio entries — checking one unchecks the others of the same group under the same parent, with a round bullet instead of a check mark.ue_menu_closed(as_key): a drop-down closed without a choice — by the user (click outside, Esc, sliding to the next menu) or by your code removing, clearing, hiding or disabling the open menu. Undo there whatue_menu_openingprepared.of_add_separatoraccepts the address of an entry ("file/export"): the line goes into its cascade.of_menu(key)carries item colors (il_accent,il_back_color…) and a tooltip, shown on the menu title; entry colors are drawn in the drop-down.Alt+Fheld down opens File from any control of the application, andF10works likeAlt; anAlt+letteryour application registered keeps priority.- Two titles on the same letter (
&File,&Favorites):Alt+Fmoves from one to the other, Enter opens. - An accented or non-Latin underlined letter (
&Édition) can be typed in the drop-down. - The bar is a single tab stop; the arrows move from title to title.
Ctrl++,Ctrl+-,Ctrl+,,Alt+Left,Ctrl+Space,Ctrl+Tab,Ctrl+Backspaceshortcuts fire wherever the focus is (they were shown but did nothing from a PowerBuilder control), including on an AZERTY keyboard.- Every native menu of the component (like every native menu of the library) lets the user type the first letters of an entry to jump to it, read through the keyboard layout; a menu with more than 500 entries only draws what is visible.
- The bar stays on one line: the titles that do not fit, from the end, fold into a chevron at its end, their entries as cascades. Alt + the letter of a hidden menu opens it from the chevron, the arrows stop on the chevron like on a title, and it sits on the left in right-to-left layouts.
ib_wrap = truekeeps the bar that wraps to several rows. ib_track_hoverandue_item_hover(as_keys): the entry under the pointer or the keyboard in an open drop-down, for a help text in a status bar; an empty address when the drop-down closes.of_add_header: section headers in a drop-down or a cascade.is_alignon a menu:ALIGN_ENDsets it at the end of the bar, like Help.
Fixed #
- After a mouse choice in a drop-down, the focus goes back to the control that had it before
ue_item_selectedis raised (Edit > Paste pasted nowhere); same on Esc and on a click outside. ue_menu_openingis truly "just in time": the drop-down waits for the event to finish, so an entry disabled or filled there shows at this opening, not the next one.of_itemandof_remove_itemreach the entry their address names, even when the same key exists in another cascade (file/export/pdf,file/print/pdf); the shortcut shown on one no longer triggers the other; a sub-entry below the third level lands under the right parent.- An entry disabled, hidden or removed while its drop-down is open, or a shortcut of an entry under a disabled cascade, no longer raises
ue_item_selected; emptying, removing or hiding the open menu closes its drop-down. - A cascade whose entries are all hidden is drawn disabled instead of being chosen as a command; separators no longer dangle at the start, at the end or doubled.
- Item colors (
il_back_color…) of a menu or an entry now take effect and read back. - An entry removed and then re-added at the same address (a recent-files list) starts without the colors and tooltip of the old one.
- Keyboard: the arrows skip disabled menus; the mnemonic of a hidden menu no longer hides the same letter on another menu; after
Alt+letterand a choice, the nextAltlights the bar again; in right-to-left layouts, Left and Right follow the writing direction and an underlined label reads in the right order. - In right-to-left reading, native menus hang from the right edge of their title and cascades open to the left (
Leftopens,Rightcloses). - Clicking the title of an open menu closes it, as in Windows, instead of reopening it.
- An
is_shortcutset on an entry that opens a cascade is neither shown nor triggered: a shortcut belongs on a leaf. - A bar whose menus are all hidden or disabled leaves
Altto a ribbon in the same window; with two bars (or ribbons) in one window,Altgoes to the one nearest the focus. - Redrawing the bar while a drop-down is open keeps its title lit.
- Reading back
il_back_color_hoveroril_text_color_hoverof an item never coloured returns-1(the theme's colour), like the other item colours (it returned0, black). - Enter or Esc pressed in the component, when it does not use them, goes back to the window: the PowerBuilder
DefaultorCancelCommandButtonfires (the key was lost). - A disabled component (
ib_enabled = false) leaves the Tab order; enabled again (or afterof_reset), it takes its place back. - With no language chosen by the application, the component announces English to screen readers (it announced French).
is_theme_style,is_theme_modeandil_theme_accentread back the style and mode shown and the component's own accent (-1when it has none); an unknown or badly written value is ignored instead of leaving the component without a theme, and an axis left empty follows the application's theme.- The application accent (
PBT_SetDefaultThemeAccent) survives a change of theme, is followed as long as the component has no accent of its own, and repaints everything derived from it (hover, pressed, selections); Windows high contrast is supported. - Typing a character with AltGr in a PowerBuilder field (the euro of a French keyboard, AltGr+E) no longer fires a
Ctrl+Altshortcut of that key, and AltGr pressed alone no longer hands the keyboard to the bar asAltdoes.
Behavior changes #
of_add_menu,of_add_itemandof_add_separatorreturn-5for a key already taken, a key containing/or|, or an unknown menu or parent (an entry with a mistyped parent used to land at the root of the menu);of_remove_item/of_remove_menureturn-5for an unknown address.of_remove_item,of_remove_menuandof_clearrelease the handles of what goes (IsValid()returnsfalse) and disarm their shortcuts, which used to swallow the key.- A bare key no longer searches down the cascades: an entry is named by its full address.
of_item("file")— a one-level address — designates nothing: useof_menu("file"). of_count("file")andof_keys_atcount entries only, not separators;of_countreturns along.- Details and how to adapt: Migrating from 3.0 to 4.0, sections 11.3 and 11.15.
- A menu bar too narrow for its titles no longer wraps to several rows: it folds the last ones into a chevron and keeps its height, so
ue_auto_heightis no longer raised at every resize.ib_wrap = truegives back the former behaviour (migration page, section 11.46).
3.0 — September 2026 #
New #
of_set_property,of_get_propertyandof_component_name: drive a property by its name (settings screen, saved configuration).
Fixed #
- Losing the focus puts the bar back to rest: clicking another control or another window no longer leaves a menu title lit until Esc.
- The hovered entry of a drop-down (shortcut, sub-menu arrow, check mark) is readable in the Office 2007 themes.
Behavior changes #
ue_item_selectedreturns the address of the entry actually chosen: with two sub-menus each holding apdf, choosing Print > PDF returns"print/pdf"(it could return"export/pdf"). See Migrating from 2.0 to 3.0.
2.0 — September 2026 #
New #
- Menus, entries and cascading sub-menus addressed by path (
"file/export/pdf"), with icons, check marks (ib_checked) and separators, drawn by the library in the application's theme instead of a Windows menu. ue_item_selected(as_keys)returns the full address of the chosen entry;ue_menu_opening(as_key)is raised before a menu opens, to enable, disable or fill its entries just in time.- Entry handles (
of_item) to rename, disable, check or hide an entry —ib_visibletakes it out of the menu, shortcut included, while keeping its key; menu handles (of_menu) to rename or disable a whole menu. - Shortcuts per entry (
is_shortcut), shown on the right and armed wherever the focus is. - Windows keyboard behavior:
Altgives the focus to the bar,&Filemnemonics, arrows, Enter, Esc. of_remove_item,of_remove_menu,of_clear, andof_count,of_keys_at,of_hasat every level.- Intrinsic height: the bar announces the height it needs (
ue_auto_height). ue_script_error: a script error in the page reaches PowerBuilder with its message instead of being lost.