Status bar issues (not message bar)
Posted: Fri Jul 21, 2006 11:54 pm
I am trying out the status bar (the common control not the older FW message bar).
I note that if you define both a PROMPT and PROMPTS, when you run the app, the first text of PROMPTS is displayed. But as soon as you move the mouse anywhere on the window, that message is immediately overwritten by the PROMPT text. Example:
DEFINE STATUSBAR oStatusBar PROMPT " Win32 StatusBar" OF oWnd ;
SIZES 150, 200, 240;
PROMPTS "One", "Two", "Three"
"One" is displayed until the cursor is moved, then "Win32 StatusBar" is displayed. I don't know if this is by design or a bug.
If you try to do oStatusBar:setPartText(1,"test"), nothing appears to happen, but if you add a msgBox() you can see that it does get displayed but then immediately overwritten by the original message.
Also the SIZES clause in the documentation says that it contains the widths of the prompts, but it actually is the location of the right edge of the box containing the prompts. To be consistant with FW's other commands it actually should be the widths, however, changing it would break existing code. But, since the status bar is only used once per application it wouldn't be very difficult to fix this broken code, and it would be nice if it was consistant with other FW code.
It would also be very nice to have these functions that I see in the Win API, setIcon(), setBkColor() [setColor() does not work], and setTipText(). The API docs can be found here:
http://msdn.microsoft.com/library/defau ... kcolor.asp
We also need to be able to define actions for each prompt and icon (if we could use icons).
James
I note that if you define both a PROMPT and PROMPTS, when you run the app, the first text of PROMPTS is displayed. But as soon as you move the mouse anywhere on the window, that message is immediately overwritten by the PROMPT text. Example:
DEFINE STATUSBAR oStatusBar PROMPT " Win32 StatusBar" OF oWnd ;
SIZES 150, 200, 240;
PROMPTS "One", "Two", "Three"
"One" is displayed until the cursor is moved, then "Win32 StatusBar" is displayed. I don't know if this is by design or a bug.
If you try to do oStatusBar:setPartText(1,"test"), nothing appears to happen, but if you add a msgBox() you can see that it does get displayed but then immediately overwritten by the original message.
Also the SIZES clause in the documentation says that it contains the widths of the prompts, but it actually is the location of the right edge of the box containing the prompts. To be consistant with FW's other commands it actually should be the widths, however, changing it would break existing code. But, since the status bar is only used once per application it wouldn't be very difficult to fix this broken code, and it would be nice if it was consistant with other FW code.
It would also be very nice to have these functions that I see in the Win API, setIcon(), setBkColor() [setColor() does not work], and setTipText(). The API docs can be found here:
http://msdn.microsoft.com/library/defau ... kcolor.asp
We also need to be able to define actions for each prompt and icon (if we could use icons).
James