Picture — version history
The library's image: a file on the machine, an image embedded in a DLL, a URL or a data URI, with framing, rotation, zoom, badge and file drop. Introduced in 1.0.
4.0 — October 2026 #
New #
is_alt_text: the replacement text read by a screen reader.- Keyboard zoom when
ib_zoomableis true:+,-,0(back to the framing) and the arrows to move the zoomed image (reversed in right-to-left reading). ue_error (string as_message, string as_reason)tells why the image is missing: constantsREASON_NOT_FOUND,REASON_TOO_LARGE,REASON_INSECURE,REASON_UNSUPPORTED,REASON_FAILED(same values as the PDF viewer);as_messagenames the source (image load failed : <source>).is_sourceaccepts themono:andtint:prefixes: the glyph is recolored by the theme, likeis_placeholderandis_error_source..avifand.jfifformats are displayed.- The mouse wheel zooms toward the pointer, in proportion to the gesture (touchpad included); a horizontal scroll no longer zooms out.
- The
1key (withib_zoomable) shows the picture at its actual size, one pixel of the picture for one pixel of the screen. id_max_zoom: the ceiling of the zoom (8.0 by default, any value from 1.0); the actual size always stays reachable.
Fixed #
- Assigning the same path again after rewriting the file displays the new image: every assignment reads the disk again, like the native
Picture(the old image stayed, even in another component opened afterwards). - Dragging the zoomed image no longer raises
ue_clicked; only the left button moves it; the move is bounded, the image no longer leaves its frame (including an image smaller than the frame, which stays whereis_align/is_valignplace it) and follows the pointer at its speed. ib_mirrorandis_align/is_valignapply as seen on screen whateverii_rotationis (a mirror on an image turned a quarter turn flipped it vertically, and the placement turned with the image).id_zoomset withoutib_zoomablestays1.0instead of reading back the value set while the image stayed at its framing.is_stretch,is_align,is_valign: an unknown value reads back as the value actually applied (the default), no longer as the refused value; a negativeii_badge_sizereads back0.of_reset()also resetsii_badge,il_badge_colorandii_badge_size(they read back their old values).- When disabled (
ib_enabled = false), the picture refuses any file drop and its badge turns gray. - A placeholder or failure image (
is_placeholder,is_error_source) that cannot be found displays the library's error pictogram, no longer the browser's broken-image icon. - With
ib_auto_height, a failure or an emptied source reports a height of 48 px instead of keeping the height of the previous image. - A file drop (
ib_allow_drop) raisesue_drop_filesalone (no moreue_drag_leavebefore it), with full paths beyond 260 characters;of_resetremoves the drop target (ib_allow_dropback tofalse). id_zoomread back keeps its decimals on a machine that uses a decimal comma.- The "ready to receive a drop" outline is visible in every theme.
- 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.
Behavior changes #
See the "Migrating from 3.0 to 4.0" guide, sections 11.25 and 11.47.
il_badge_color:-1= not set (the theme color),0is now black; replaceil_badge_color = 0with-1.- A double-click raises a single
ue_clickedthenue_double_clicked, like the nativePicture(it raised two). ue_errortakes a second argument (as_reason); an event script receives it automatically, anevent ue_error(…)written in your code now passes two.is_source = "http://…"is refused at once (REASON_INSECURE) instead of failing without a reason: download the image (n_pbt_restclient.of_download) then display the file.- Setting
id_zoomfrom your code raisesue_zoom_changedlike a user gesture (nothing when the factor stays the same). - The zoom is no longer stopped at 8 times the fitted view when the actual size of the picture asks for more: a large scan shown small can be read pixel for pixel.
3.0 — September 2026 #
New #
of_set_property,of_get_propertyandof_component_name: drive a property by its name (settings screen, saved configuration).
Fixed #
ue_erroris raised again when the image does not load: since 2.0 it no longer reached your script.il_badge_colorreads back the color that was set (it returned0).
2.0 — September 2026 #
New #
ue_script_error: a script error in the page reaches PowerBuilder with its message instead of being lost.
1.0 — August 2026 #
New #
- Sources: file on the machine, image embedded in a DLL (
dll:name),httpsURL, data URI;is_placeholder(while waiting) andis_error_source(on failure), which acceptmono:to follow the theme. - Framing with
is_stretch(STRETCH_NONE,STRETCH_FILL,STRETCH_UNIFORM,STRETCH_UNIFORMTOFILL) and placement withis_align/is_valign. ii_rotationby quarter turns,ib_mirror.- Zoom (
ib_zoomable,id_zoomup to ×8) with the wheel and double-click, moving the zoomed image,ue_zoom_changed. - Notification badge:
ii_badge,il_badge_color,ii_badge_size. - File drop from the Explorer (
ib_allow_drop,ue_drop_files,ue_drag_enter,ue_drag_leave). ib_auto_height: the height follows the image's aspect ratio (ue_auto_height).- Visible wait for a slow image, pictogram on failure;
ue_loaded(width, height),ue_error. ue_clicked,ue_double_clicked,ue_rclicked, andue_mouse_enter/ue_mouse_leavewithib_track_mouse; simple and rich tooltips; themes.