PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Message/Status Bar Updates  (Read 867 times)

James Zukowski

  • Diamond Member
  • *****
  • Posts: 297
    • View Profile
Message/Status Bar Updates
« on: November 02, 2022, 03:54:17 PM »
We've set up panels with an "Export to Excel" button. On the User Aid tab, we've set the Message Bar text to "Export to Excel". During the export process, we're reading entries from a listbox and sending them to Excel via DDE. Since it's not the swiftest process in the world, I'm trying to update the Status Bar every 100 records, but it won't change. If I include a MSGBOX (for my info), the Status Bar changes - but only for the duration of the MSGBOX; then it changes back to "Export to Excel".
Is there some setting I'm missing? Is this correct behavior?
Thanks in advance.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Loren Doornek

  • Gold Member
  • ****
  • Posts: 85
    • View Profile
Re: Message/Status Bar Updates
« Reply #1 on: November 02, 2022, 04:34:08 PM »
Try moving the focus off of the button 'Export to Excel' button while the process is running (just pressing 'tab' should move the focus elsewhere).  I've seen this in some of my panels where the messagebar just keeps holding the message that is setup on the User Aid tab.

Also, try adding a WAIT 0 after you set the message to be displayed.  That forces the system to do any screen updates that might be waiting out there.

HendersonS

  • Gold Member
  • ****
  • Posts: 58
    • View Profile
Re: Message/Status Bar Updates
« Reply #2 on: November 02, 2022, 04:37:27 PM »
hi james,

if you are using pxplus v10 or higher, you may want to use the listbox and grid system popup menu to accomplish this by simply calling a routine

Code: [Select]
CALL "*plus/winutl/listpopup;Export_to_File",ctl_no,exportfile$
For more info:
https://manual.pvxplus.com/PXPLUS/NOMADS%20Graphical%20Application/Creating%20Panel%20Controls/Popup%20Menu/List%20Box%20and%20Grid%20System%20Popup%20Menu.htm

James Zukowski

  • Diamond Member
  • *****
  • Posts: 297
    • View Profile
Re: Message/Status Bar Updates
« Reply #3 on: November 02, 2022, 05:33:39 PM »
Loren:
I've noticed that, as well. Unfortunately, nearly all of the controls on the panels have Message Bar messages. Fortunately, they mirror the Tool Tip messages, and we don't have a HUGE number of panels. Just clearing the Message Bar messages may be the final answer on this.

Henderson:
I vaguely remember seeing reference to that somewhere in my past. I just tried a couple of tests, and while the timing seems good, we've also embedded some color highlights into the report listbox lines and these exports lose those. Will keep it in mind for future possibilities, though.

Thanks All!
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services

Loren Doornek

  • Gold Member
  • ****
  • Posts: 85
    • View Profile
Re: Message/Status Bar Updates
« Reply #4 on: November 03, 2022, 01:47:05 AM »
James,

Maybe try just using a segmented status bar.  That's an often forgotten feature that actually works very well, and has a nice appearance also.  The message from the panel definition will always be in segment 1, and you can put your message in segment 2.   You can re-define the status bar while your routine is running, then reset it when the routine is complete.  Doing this would allow your routine to display a status message without requiring you to modify all of your controls that have a message.

For example, assume you have a panel with a width of 40.  This will define 2 segments (each with a width of 20) in the status bar, and print your message in the second segment.  At the end, it resets the status bar to a single segment.  Note that the second argument of the 'MESSAGE' mnemonic specifies the segment where the message should be printed.

PRINT 'MESSAGE'(DEF 20,20),; WAIT 0
FOR i=1 TO 10; PRINT 'MESSAGE'("this is test "+STR(i),2); WAIT 1; NEXT
PRINT 'MESSAGE'(DEF 0)

https://manual.pvxplus.com/PXPLUS/mnemonics/message.htm


James Zukowski

  • Diamond Member
  • *****
  • Posts: 297
    • View Profile
Re: Message/Status Bar Updates
« Reply #5 on: November 03, 2022, 09:05:45 AM »
Loren:
Thanks for the reminder. We had used that at a previous job successfully. I had noticed that the existing code here was referencing segment 0, though it didn't need to. By defining segment 1 and using that, we should be able to do what we need, then reset it when done.
James Zukowski
Sr. Developer - J&E

BRAND>SAFWAY
Brand Industrial Services