Page 1 of 1

updating of the status bar messages

Posted: Sat Apr 30, 2016 11:54 am
by Rieko Saitoh
Hi,

I would like to display the messages before updating and after it.
During the update, the message is "it is updating, Please wait" in the status bar.
After the update, the message is "updating is completed" in the status bar.

In the event routine of a button click, I did the coding such as the following.
But, it was not successful.

- Start message
- Update processing
- Clear message
- Completion message

I used UpdateDisplay method in the status bar, but it does not work.


<questions>
1. Have anyone used "UpdateDisplay method" to the status bar?
2. Is it possible to update the status bar message in one event?


Thank you.

Best regards,
Rieko Saitoh

Re: updating of the status bar messages

Posted: Thu May 05, 2016 4:20 pm
by dannyoorburg
Hi Rieko,

have a look at the form below, is that what you're trying to achieve?

Regards,
Danny

Code: Select all

Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Clientwidth(478) Clientheight(174) Left(861) Top(188) Height(213) Width(494)
Define_Com Class(#PRIM_PHBN) Name(#Button1) Caption('Button1') Displayposition(1) Left(41) Parent(#COM_OWNER) Tabposition(1) Top(38)
Define_Com Class(#PRIM_STBR) Name(#StatusBar1) Displayposition(2) Left(0) Messageposition(1) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(124) Width(478)

Evtroutine Handling(#Button1.Click)

Message Msgtxt("Started") Type(*STATUS)

#StatusBar1.UpdateDisplay

#COM_OWNER.DoWork

Message Msgtxt("Still working on it") Type(*STATUS)

#StatusBar1.UpdateDisplay

#COM_OWNER.DoWork

Message Msgtxt("Finished")

Endroutine

Mthroutine Name(DoWork)
Define_Com Class(#PRIM_ALPH) Name(#MyString)

Begin_Loop To(20000)

#MyString += "x"

End_Loop

Endroutine

End_Com

Re: updating of the status bar messages

Posted: Wed May 11, 2016 2:47 pm
by Rieko Saitoh
Hi Danny,

Thank you for the sample.
I will be able to achieve it by this way.
Thank you so much for your help!!

Best regards,
Rieko Saitoh