Status bar issues (not message bar)

Status bar issues (not message bar)

Postby James Bott » 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Sat Jul 22, 2006 6:33 am

James,

>
DEFINE STATUSBAR oStatusBar PROMPT " Win32 StatusBar" OF oWnd ;
SIZES 150, 200, 240;
PROMPTS "One", "Two", "Three"
>

PROMPT means the default msg, and PROMPTS the different items. But, yes, when you move the mouse over the window, then PROMPT overrides the first item of PROMPTS. Have a look a samples\stbar.prg and select menuitems from the menu, you'll see the idea about how to use the first item.

We do plan to enhance this control as you have described.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41404
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby James Bott » Sat Jul 22, 2006 6:59 am

Antonio,

>Have a look a samples\stbar.prg and select menuitems from the menu, you'll see the idea about how to use the first item.

I had looked at the sample but I didn't notice the menu. Thanks for pointing it out.

I also notice that some of the new Microsoft status bars have other controls on them too, like sliders (Word 2007), and menus (IE 7). These capability would also be very useful.

If I can help with any of this, let me know.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 27 guests