SystemRequest with "non standard buttons" looks strange

Discuss any general programming issues here
User avatar
Clyde
Posts: 348
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

SystemRequest with "non standard buttons" looks strange

Post 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!
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
plouf
Posts: 467
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: SystemRequest with "non standard buttons" looks strange

Post by plouf »

here windows7 hollywood8 and it look as expected

https://ibb.co/r7sb5qg
Christos
User avatar
Clyde
Posts: 348
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: SystemRequest with "non standard buttons" looks strange

Post 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.
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
AUserLG
Posts: 16
Joined: Sun Feb 14, 2010 11:26 pm
Location: Ottendorf-Okrilla / Germany

Re: SystemRequest with "non standard buttons" looks strange

Post 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. :)
SamuraiCrow
Posts: 475
Joined: Fri May 15, 2015 5:15 pm
Location: Waterville, Minnesota USA

Re: SystemRequest with "non standard buttons" looks strange

Post 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.
I'm on registered MorphOS using FlowStudio.
plouf
Posts: 467
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: SystemRequest with "non standard buttons" looks strange

Post 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
Christos
User avatar
Clyde
Posts: 348
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: SystemRequest with "non standard buttons" looks strange

Post 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.
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SystemRequest with "non standard buttons" looks strange

Post 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.
User avatar
Clyde
Posts: 348
Joined: Sun Feb 14, 2010 12:38 pm
Location: Dresden / Germany

Re: SystemRequest with "non standard buttons" looks strange

Post 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. :-)
Currently using: Hollywood 9 with Windows IDE and Hollywood 9 with Visual Studio Code and hw4vsc
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SystemRequest with "non standard buttons" looks strange

Post 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.
Post Reply