[Gambas-user] Message() upgrades/restoration options

Bruce Steers bsteers4 at gmail.com
Thu Feb 25 21:07:56 CET 2021


Doh!  This is not ready.
I just noticed auto resizing the buttons does not a smaller window make. :(

That's all I see wrong with it.

All the best
BruceS

On Thu, 25 Feb 2021, 18:57 Bruce Steers, <bsteers4 at gmail.com> wrote:

> Hi all
> I have made a slightly customised version of the Message class and
> wondered if there was interest in the new features. (especially Benoits
> views)
>
> the minor changes are of the following nature...
> *Options to restore some old behaviour*
>   Message.WindowCloseEnabled to restore close button being cancel
>   Message.LeftButtonDefault to restore left hand button having focus
>
> *3 new features.*
> Message.Custom() , a more versatile Message function with minimal coding
> that will show ANY number of buttons and ANY stock icon image.
>
> Message.ShrinkButtons simply adds AutoResize to all the buttons to improve
> the flexibility of being able to use many buttons.
>
> Message.SeparateCancel is just a nice feature i think to make the cancel
> button stand out.
>
>
> Personally i've often wanted that extra 1 or 2 buttons in a message
> and allowing any stock icon image was such a tiny bit of code for a great
> expansion on variation.
>
> Benoit , the changes in the code are small but the improvement in Message
> usability is great.
> I understand if you are not interested.
> My main drive for doing this is the amount of times i've clicked the
> bloomin close window button since it's stopped working, grrrr ;) lol
>
> commit url and message below..
>
> Wishing well
> BruceS
>
>
>
> https://gitlab.com/bsteers4/gambas/-/commit/0a8525de63d770580c32825f3f8d312ea303036a
>
> [GB.GUI.BASE]
> * NEW: Added command Message.Custom(sMessage As String, sButtons As String[], sStockIcon As String)
>   Any number of buttons may be given as String[] and Any stock icon image name may be given.
> * NEW: Static Boolean Property Message.WindowCloseEnabled, Restores old behaviour of the window close button being cancel/escape.
> * NEW: Static Boolean Property Message.LeftButtonDefault, Gives the left hand button focus instead of the right hand one.
> * NEW: Static Boolean Property Message.SeparateCancel , adds a space between the cancel button and the others.
> * NEW: Static Boolean Property Message.ShrinkButtons, Sets AutoResize on the buttons so they fit their texts
>   the normal method is to make All the buttons the same size as the largest button text.
>
> ANY number of buttons can be entered, it is up to the user to ensure they do not exceed screen width.
> ANY stock icon image name can be given, if not found it falls back to "info"
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210225/9eea1d2d/attachment.htm>


More information about the User mailing list