Message Bar problems

Message Bar problems

Postby Gilbert » Sun May 21, 2006 2: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
Gilbert
 
Posts: 74
Joined: Thu Oct 20, 2005 4:30 pm
Location: Canada

Postby Antonio Linares » Sun May 21, 2006 5:42 pm

Gilbert,

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

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

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

Postby Gilbert » Fri Oct 06, 2006 7: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
Gilbert
 
Posts: 74
Joined: Thu Oct 20, 2005 4:30 pm
Location: Canada

Postby James Bott » Fri Oct 06, 2006 7:40 pm

Gilbert,

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

Code: Select all  Expand view
// 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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 11 guests