Page 1 of 2

SystemRequest with "non standard buttons" looks strange

Posted: Sun Aug 11, 2019 12:09 am
by Clyde
I don't know whether this is a bug or itentional (if that latter: I don't like it :-) ) but the "SystemRequest" dialog looks very strange if you add "non standard buttons" (tested only under Windows 10).

The dialog looks good with this defintion:

Code: Select all

Local result = SystemRequest("Quit the application", "There are unsaved changes. If you quit the application your changes will be lost. Do you really want to quit?", "Yes|No", #REQICON_WARNING)
Image

But if I add another button, the dialog goes wild:

Code: Select all

Local result = SystemRequest("Quit the application", "There are unsaved changes. If you quit the application your changes will be lost. Do you really want to quit?", "Yes|No|Maybe", #REQICON_WARNING)
Image

The expected behaviour for me is to see three buttons (not a list) and the requester icon.

Thanks!

Re: SystemRequest with "non standard buttons" looks strange

Posted: Sun Aug 11, 2019 2:20 pm
by plouf
here windows7 hollywood8 and it look as expected

https://ibb.co/r7sb5qg

Re: SystemRequest with "non standard buttons" looks strange

Posted: Sun Aug 11, 2019 10:14 pm
by Clyde
Thanks for testing, plouf! Hm, maybe it is a problem with Hollywood 7.1 which I am still using. I will install version 8 and try this.

Re: SystemRequest with "non standard buttons" looks strange

Posted: Mon Aug 12, 2019 12:20 am
by AUserLG
Do you have RapaGUI active? I do not know why, but this occours when RapaGUI is active. Also with HW8.
So either you deactivate RapaGUI or you build your own Dialog with RapaGUI. :)

Re: SystemRequest with "non standard buttons" looks strange

Posted: Mon Aug 12, 2019 4:54 am
by SamuraiCrow
Adding to what AUserLG said, keep in mind that the table lookups on the button names on RapaGUI are case sensitive. That caught me off guard once when I made an OK button instead of an Ok button or the other way around. The syntax on RapaGUI is different, to be certain.

Re: SystemRequest with "non standard buttons" looks strange

Posted: Mon Aug 12, 2019 6:12 am
by plouf
AUserLG wrote: Mon Aug 12, 2019 12:20 am Do you have RapaGUI active? I do not know why, but this occours when RapaGUI is active. Also with HW8.
So either you deactivate RapaGUI or you build your own Dialog with RapaGUI. :)
confirm

Code: Select all

@REQUIRE "RapaGUI"
Local result = SystemRequest("Quit the application", "There are unsaved changes. If you quit the application your changes will be lost. Do you really want to quit?", "Yes|No|Maybe", #REQICON_WARNING)
above code gives same results as original post report

Re: SystemRequest with "non standard buttons" looks strange

Posted: Mon Aug 12, 2019 12:48 pm
by Clyde
Thanks, Lars! Yes, I am using RapaGUI. Still the behaviour is strange IMHO. I would like to use SystemRequest as it is indendet. It shouldn't make a difference whether RapaGUI is active or not.

Re: SystemRequest with "non standard buttons" looks strange

Posted: Mon Aug 12, 2019 6:15 pm
by airsoftsoftwair
Clyde wrote: Mon Aug 12, 2019 12:48 pm It shouldn't make a difference whether RapaGUI is active or not.
That's actually because of wxWidgets. On Windows, there is no standard OS dialog with custom buttons. The standard OS message box dialog only supports buttons like Yes, No, OK, Cancel but not custom labels. Thus, Hollywood's implementation of SystemRequest() uses custom code to create such dialogs. If you look closely, you'll see that SystemRequest() dialogs that don't use standard button labels like OK, Cancel, Yes, No aren't standard OS dialogs but custom ones created by Hollywood.

When RapaGUI is active, all UI functionality is mapped through wxWidgets which does have an API for asking for a single custom choice but since Windows doesn't have such a dialog, wxWidgets also creates a custom one, although it looks different than Hollywood's custom one.

Re: SystemRequest with "non standard buttons" looks strange

Posted: Thu Aug 22, 2019 2:55 pm
by Clyde
I see, thanks for the clarification. Would it be an option to introduce a flag separate comand for RapaGUI to temporarly disable the wxWidget functionality and use the Hollywood's native requester? I guess not :-), but I ask anyway. :-)

Re: SystemRequest with "non standard buttons" looks strange

Posted: Fri Aug 23, 2019 7:28 pm
by airsoftsoftwair
Clyde wrote: Thu Aug 22, 2019 2:55 pm I see, thanks for the clarification. Would it be an option to introduce a flag separate comand for RapaGUI to temporarly disable the wxWidget functionality and use the Hollywood's native requester? I guess not :-), but I ask anyway. :-)
No, that's not possible because RapaGUI exchanges Hollywood's core event handler entirely so it's not possible for RapaGUI to use Hollywood's native requester.