Re: [Scilab-users] Messagebox - button pre-selection

2023-01-07 Thread Samuel Gougeon

Le 22/10/2021 à 12:56, P M a écrit :

Dear,

in a messagebox:

Is it possible to have a button other than the first one pre-selected?

e.g.: I'd like to have "No" pre-selected in the example below?

In my application the buttons must stay in their order as they 
are...so simply changing the order (button label) is no option.


Thank you,
Philipp

grafik.png




Is it possible to have a button other than the first one pre-selected?


Almost :-/  So, AFAIK, unfortunately no.
There is a CallScilabBridge.setMessageBoxDefaultSelectedButtons(id, k) 
java method (*)

that should set it, where k is the index of the preselected button.
But in the code it is apparently implemented only for x_choices()

As well,

messagebox("Have you seen this beautiful message", "info", ["Yes" "No"]);
jimport org.scilab.modules.gui.utils.UIElementMapper ;
m = UIElementMapper.getCorrespondingUIElement(1);
m.setDefaultSelectedButtons(1); // First is #0

does nothing

Samuel

(*)
jimport org.scilab.modules.gui.bridge.CallScilabBridge
jgetmethods(CallScilabBridge)
___
users mailing list - users@lists.scilab.org
Click here to unsubscribe: 
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Messagebox - button pre-selection

2021-10-22 Thread Stefan Du Rietz

Sorry, I didn't read yor message to the end ...

On 2021-10-22 14:18, Stefan Du Rietz wrote:

Hello Philipp,
you can change the button labels.

Regards
Stefan


On 2021-10-22 12:56, P M wrote:

Dear,

in a messagebox:

Is it possible to have a button other than the first one pre-selected?

e.g.: I'd like to have "No" pre-selected in the example below?

In my application the buttons must stay in their order as they 
are...so simply changing the order (button label) is no option.


Thank you,
Philipp

grafik.png



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[Scilab-users] Messagebox - button pre-selection

2021-10-22 Thread P M
Dear,

in a messagebox:

Is it possible to have a button other than the first one pre-selected?

e.g.: I'd like to have "No" pre-selected in the example below?

In my application the buttons must stay in their order as they are...so
simply changing the order (button label) is no option.

Thank you,
Philipp

[image: grafik.png]
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users