Button bar — version history
A row of command buttons — icon, label or both — in a single component; a click returns the button's key. Introduced in 3.0, where it replaces the deprecated button component.
4.0 — October 2026 #
New #
of_focus_button(as_key)puts the keyboard focus on one button — "No" rather than "Yes" before a destructive question;-5on an unknown key,-4when the button is disabled, hidden or not drawn.- An icon-only button is named to a screen reader by its tooltip, otherwise by its key.
[symbol=name]tag in rich text: eighteen monochrome glyphs that follow the text colour (clock,location,person,calendar,phone,mail,warning…); an unknown name stays as text.
Fixed #
- Enter triggers the button that has the keyboard focus, as in Windows; the default button (
is_default) fires when no button of the bar has the focus, and the focused button wears the default look meanwhile (is_defaultread back is unchanged). - A default or cancel button that is disabled or hidden, and the
is_shortcutletter of a disabled or hidden button, no longer swallow Enter, Esc or Alt+letter: the key stays with the window, PowerBuilder controls included. - A multi-letter
is_shortcut("Save") works from anywhere in the window (Alt+S, the first letter); Alt+letter skips an unusable button and tries the next one carrying the letter. - A shortcut given by the application to a button is no longer erased when the button is disabled and re-enabled, or when its
is_shortcutletter changes; an explicit shortcut wins over a button's Alt letter. - With two components in the same window (two MDI sheets, two panels), Enter, Esc or a shortcut go to the one closest to the focus, no longer to the first one created; Enter on a focused PowerBuilder
CommandButtonpresses that button (not the bar's default one), and Enter or Esc in an openDropDownListBoxstays with the list. - Holding Enter down no longer triggers the button repeatedly.
- A property change no longer rebuilds the whole bar: focus and pressed state survive it; hiding the focused button moves the focus to its neighbour.
- A bar too narrow no longer drops its first buttons: labels shorten with "…" down to a 64-pixel floor.
- A single tab stop; the Left and Right arrows swap in right-to-left reading, where separators and badge are also placed on the correct side.
- The default button stays readable while pressed.
ii_padding_xnegative gives the space back to the theme, likeii_padding_yandii_gap(it fell back to 12); the separator line is drawn only between touching buttons (ii_gap = 0).- 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. - Rich text: a closing tag closes its own tag only (
[b]A[i]B[/b]CleavesCin italics only), a]escaped byof_escape_markupright after a tag no longer breaks the formatting around it, and[picture=…]accepts a data URI and a file name containing a comma.
Behavior changes #
of_add_button/of_insert_buttonon a key already taken or containing/or|, andof_remove_button/of_move_buttonon an unknown key, return-5(they returned0and were ignored).of_remove_buttonandof_clear_buttonstake the button's Alt letter, the application's shortcuts, colours and tooltip away with it, and release its handle (IsValid()returnsfalse); removing theis_defaultoris_cancelbutton, or clearing the bar, empties that property.of_register_shortcut(chord)without a key, or with a key naming no button, returns-5(it returned0and swallowed the key).of_countreturns alongandof_keys_attakes alongrank.- See the 3 → 4 migration guide, sections 11.3, 11.13 and 11.41.
- Rich text: a markup image on a network share (
[picture=\\server\share\x.png]) is no longer shown: go throughof_icon(), which embeds it.
3.0 — September 2026 #
New #
- First release: buttons by key (
of_add_button,of_insert_button,of_move_button,of_remove_button,of_clear_buttons), with icon, label or both, and a single eventue_clicked(as_key). is_default(the accent button that Enter triggers) andis_cancel(the one Esc triggers), like the OK and Cancel of a dialog box.- Layout:
is_align(start,center,end,justify),ii_gapbetween buttons,ii_padding_xandii_padding_yaround the row. - Button handle
n_pbt_buttonbar_button(of_button(key)):is_text,is_image,ib_enabled,ib_visible,il_badge,is_shortcut(Alt+letter, underlined in the label) and per-button colours. ue_script_error: a script error in the page reaches PowerBuilder with its message instead of being lost.of_set_property,of_get_propertyandof_component_name: drive a property by its name (settings screen, saved configuration).of_count,of_keys_atandof_has: what the component holds can be asked, at every level.