Message box — version history
The themed modal dialog box with a synchronous return: the replacement for PowerBuilder's MessageBox(), with rich text, free buttons, icon, check box and input field. A non-visual object, free of charge. Introduced in 1.0.
4.0 — October 2026 #
New #
of_get_last_error(): why the last box could not open (empty string if it opened).- The text of the message and of the instruction can be selected and copied; the box is moved by its title, its icon and its margins.
- Ctrl+C also copies the choices (title and description) and the state of the check box.
- The box's window carries the title (or the instruction): it appears in Alt+Tab and is announced by screen readers, which also read the message.
il_accent(the accent color of the box) is documented.[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 #
- A box that could not open (WebView2 runtime missing, engine not ready) no longer returns
0like a close:of_showand the shortcuts (of_info…) return-4(-6if the runtime is missing),of_chooseandof_promptan empty string, andof_get_last_errorgives the reason. - An input of more than about 900 characters (
of_prompt,ib_input) comes back whole (it came back empty). ib_input_required: neither the countdown of a button (of_add_button_timed), nor Esc, nor Alt+F4 validate an empty required field any more.- Esc and Alt+F4 no longer close the box while a cancel button is still counting down.
- Closing the owner window while the box is open:
of_showreturns (0) instead of waiting forever. - With
al_hwnd = 0, nothing is disabled any more (it was the whole desktop); a box opened from another one leaves the window disabled as long as the first one is waiting; a box moved then enlarged keeps its place. - The scroll bar of a long message can be dragged (the gesture moved the box).
il_min_widthandil_max_widthdo not go below 200 pixels (a smaller width opened a 480 × 220 box after 2 seconds).- With no language set by the application, the buttons of the ready-made boxes (
of_info,of_confirm,of_yes_no…) say "OK", "Cancel", "Yes", "No" (the first one said "Ok"). - The warning icon and the colors of the box are readable in every theme.
- 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. - With no language chosen by the application, the component announces English to screen readers (it announced French).
- 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.
Behavior changes #
of_add_choicereturns-5and adds nothing for a key that is empty, already taken, or contains/or|;of_choosewith no choice shows nothing and returns""— see "Migrating from 3.0 to 4.0", section 11.39.- A test
= 1for "confirmed" is still right, but a negative value now means "no box was shown". of_countreturns along(section 11.34).- 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 #
- List of choices:
of_add_choice(as_key, as_title, as_description)adds a choice (title and description, like the command links of a Windows task dialog),of_choose(al_hwnd)shows them with a single Cancel button and returns the key of the clicked choice, or""if the user cancelled. The list scrolls when it is taller than the screen; no choice is preselected, Tab or Down arrow reaches the first one.
Fixed #
- Hovered buttons are readable in the Office 2007 theme, light and dark.
- Rich text: a
[word]that is not a tag is shown as typed (report[final].pdf) instead of disappearing with the rest of the text.
2.0 — September 2026 #
New #
ib_movable(true by default): the box, which has no title bar, can be moved with the mouse;falsekeeps it where it is.of_count(): the number of buttons added.
1.0 — August 2026 #
New #
of_show(al_hwnd)blocks and returns the rank of the clicked button, likeMessageBox(); free buttons (of_add_button), with a default button, a cancel button, an icon, an&mnemonic and a countdown (of_add_button_timed).- Title, main instruction and message in rich text;
ICON_*icons or a custom image; clickable[action=…]areas in the message (of_action). - "Don't ask me again" check box (
is_checkbox,of_checked) and input field (ib_input, required, masked,of_input_value). - Ready-made one-line boxes, with buttons translated into six languages:
of_info,of_warning,of_error,of_success,of_confirm,of_yes_no,of_yes_no_cancel,of_prompt. - Position (over the window or the screen), maximum widths and height, keyboard (Enter, Esc, Alt + letter, Tab) and Ctrl+C to copy the box.