1. Steen Jakobsen
  2. PowerBuilder
  3. Sunday, 4 April 2021 08:34 AM UTC

Hi my great fellow PB-champs :-)

 

Does anyone know if it is possible to trigger the dropdown menu associated with at "LargeButton" to dropdown from a script (programmatically). 

I'm using 2019R3

(I want to do that because the used needs to make a choice from the menu before continuering.)

 

Thanks for any feedback in advance.

 

//Steen

Bruce Armstrong Accepted Answer Pending Moderation
  1. Wednesday, 7 April 2021 17:02 PM UTC
  2. PowerBuilder
  3. # 1
0
Votes
Undo

I'd argue that all the LargeButton event should be doing is calling an event/function on the main window.  So rather than try to trigger that event, simply call the same event/function on the window.

Comment
Hi Bruse,

You are right. But I want the user to choose from the dropdown menu. That is why I want to force it to drop.

Any idea?
  1. Steen Jakobsen
  2. Thursday, 8 April 2021 03:46 AM UTC
Ah, I see. I don't know any way to do that.



For that matter though, what would prevent the user from clicking on something else (e.g., some other button) after you've dropped the menu?
  1. Bruce Armstrong
  2. Thursday, 8 April 2021 19:04 PM UTC
Nothing prevents him for doing that. It just a suggestion I want to make based on the previous actions the user did.
  1. Steen Jakobsen
  2. Friday, 9 April 2021 15:14 PM UTC
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Monday, 5 April 2021 13:10 PM UTC
  2. PowerBuilder
  3. # 2
1
Votes
Undo

Greetings, Steen - 

Call me old school, but wouldn't a modal (i.e., response) window be a more appropriate way to ensure the user makes a selection or cancels the operation before continuing?

Best regards, John

Comment
Hi John,



Thanks for giving me feedback :-)

I already open a msgbox to tele the user he must make a choice. The functionality I want, is to visually then after the user clicks OK in the msgbox to dropdown the menu in the appropriate "LargeButton" in the RibbonBar.



That would be really elegant. But I dont know how ?



//Steen

  1. Steen Jakobsen
  2. Tuesday, 6 April 2021 09:13 AM UTC
Although a MessageBox is yes, technically a modal/response window, I was suggesting providing a custom response window that both contains the prompting message and the drop-down mechanism. Then the user is not only notified of the condition, but can also take the necessary action, all in one step. That, to me at least, is a simpler, cleaner user interface than a two-step process whereby you are trying to coerce modality out of a mechanism (the RibbonBar) that is not designed with modal responses in mind.



Best wishes and good luck!
  1. John Fauss
  2. Tuesday, 6 April 2021 13:47 PM UTC
Thanks John,

I understand your point. But I want the user to choose from the dropdown menu. That is why I want to force it to drop.

Any idea?
  1. Steen Jakobsen
  2. Thursday, 8 April 2021 03:47 AM UTC
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.