FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper Message Bar problems
Posts: 74
Joined: Thu Oct 20, 2005 04:30 PM
Message Bar problems
Posted: Sun May 21, 2006 02:41 PM

Hi All,

At window activation I prompt LogIn in the message bar. So far so good
Once the user has entered is login name I want to display the user name in the message bar.

So I use:

oMsgBar:SetMsg(cUserName), oMsgBar:Refresh()

I can see the user name display for a fraction of second and LogIn redisplays again on top.

What am I doing wrong ? :(

Gilbert Vaillancourt
turbolog@videotron.ca
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Message Bar problems
Posted: Sun May 21, 2006 05:42 PM

Gilbert,

Do you have a menuitem that uses ... MESSAGE "Login" ?

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Message Bar problems
Posted: Fri May 26, 2006 08:09 PM

I had fits with this too. It may be a bug. Here is a workaround.

oWnd:oMsgBar:cMsgDef:=cUserName
oWnd:oMsgBar:setMsg("")

cMsgDef is the message that gets displayed.

This works for me.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 74
Joined: Thu Oct 20, 2005 04:30 PM
Message Bar problems
Posted: Fri Oct 06, 2006 07:27 PM

Hi all,

Sorry it took so long to reply, too muxh work I guess.

I dont have any menuitem with MESSAGE Login

I also tried James Bott solution but it did`nt work.

Regards,

Gilbert :(

Gilbert Vaillancourt
turbolog@videotron.ca
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Message Bar problems
Posted: Fri Oct 06, 2006 07:40 PM
Gilbert,

Sorry, you also need to do a refresh().

// Purpose: To test changing the message bar message

#include "fivewin.ch"

function main()
   local oWnd,oBar
   local cUsername:= "James"

   define window oWnd

   define buttonbar oBar of oWnd
   define button of oBar ;
     action (oWnd:oMsgBar:cMsgDef:= cUsername, oWnd:oMsgBar:setMsg(""),oWnd:oMsgBar:refresh())

   set message of oWnd to "Login"

   activate window oWnd

return nil
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10

Continue the discussion