Modifiers
Tilde (~) - indicates that the first panel of the status bar is to be used for help strings.

Description
N is optional. When N > 1, it specifies the number of panels and iar is an integer array specifying the width (in average characters) of each panel in turn. The width of the last panel is set automatically to extend to the right hand edge of the window. When N is not provided, iar is also omitted, resulting in just one panel. A grave accent can be applied and indicates that the first panel of the status bar is to be used for help strings.

Not that it matters, because the truth can be established by some simple trials.

My question is: Is there a way of determining at runtime how many characters are (roughly) available in a status bar ?

looks like it'll be May to me_________________''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... "

In ClearWin there's the function GET_TEXT_SIZE@ but that gives th length for a given string.

The key I guess is getting hold of the aerage character width for a given font.

Just a thought - I assume that there's a check built into %sb which flags an error oģif the total length of all panels is greaer than the overal available length ?_________________''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... "

I followed up the suggestion, and it isn't a lot of help. I came across SBARS_SIZEGRIP - that is something that puts the sizing icon in the bottom rhs of the window. Aesthetically, when the client area extends to the bottom of the window, the window looks a bit unbalanced, and even when a status bar is in use, (because everything is clustered to the left), the 'size-grip' is a nice feature, even if it is rather obsolete as all window edges are resizable these days.

I also saw that the status bar can have tooltips. My suggestion is therefore for:

%sb[sizegrip][tooltips]

I'm not much of a fan of straying outside Clearwin+, as you probably guessed.

I probably didn't express myself well in the original post. What I really want to do is find out how much capacity the status bar has before I invoke winio@('%sb so that I don't simply program invisible stuff off the end. I know this will be wrong for different logical dpi settings, so it will need to be assessed conservatively. Perhaps it's a question of running some tests and measuring using my onscreen pixel ruler: 'RulerByGeorge!'

Eddie

PS. Just about everything I write is run fullscreen, because the maximum number of pixels is required for the best graphical interaction.

Then use it with the pixel width of the sb/window to determine the approx. no. of characters_________________''Computers (HAL and MARVIN excepted) are incredibly rigid. They question nothing. Especially input data.Human beings are incredibly trusting of computers and don't check input data. Together cocking up even the simplest calculation ... "

I've done some measurements, and with a standard dpi setting, the text typically has a length that equates to about 5.3 pixels per character.

I run a dual monitor setup, with two 1920x1080 screens side by side. When my app with a %sb is launched, the statusbar doesn't have a 'sizegrip' If I move the window to straddle the two monitors, the window extends laterally, and the status bar then shows a 'sizegrip', which then remains part of it even if the window is shrunk back to fit on one screen. Weird.

SBARS_SIZEGRIP does not appear to do anything useful. If the window can be resize then you get the gripper anyway. If the window can't be resized then SBARS_SIZEGRIP adds the gripper but you can't use it to resize the window.

The SBARS_TOOLTIPS style is rather limited. Its purpose is to provide a tooltip for when the text is too long to fit into the pane. When the pane is big enough the tooltip does not appear. The tooltip is simply a copy of the text in the pane and the user sets this by calling set_status_text@.

This will probably not work with the first pane and %`sb where menu item info is controlling the content of the pane.