[Gambas-user] Ampersand on a ToolButton

james at lixce.com james at lixce.com
Thu Jan 11 05:15:33 CET 2024


My apologies to all, it is actually a Button, not a ToolButton. The underscores in the original post were just to set it apart from the remainder of the sentence. I use ToolButtons for nearly everything because they nicely scale .svg files to the ToolButton size as long as the .svg is larger than the final representation and they only show background color when the mouse pointer enters or the border is set.  For the virtual keyboard I wanted to be able to control the size of the icons for BackSpace, Return etc. and have borders on the Buttons.  The double ampersand Bruce suggested and Martin confirmed worked perfectly (one extra line of code to get rid of the second when the Button is clicked).  I did try a single ampersand as Charlie suggested on both a Button and a ToolButton but it does not work here, possibly a GTK vs Qt5 thing as I have NO GTK on my systems and do eveything in Qt5.

They keyboard works well on the tablet and is completely written in Gambas. I started with  an idea from pintaScreen by Antonio Sánchez y Julio Sánchez that has a virtual keyboard written by  Luis Jorge Martin Aznar.

One improvement I would like to make is to NOT take the focus away from the program I am sending keystrokes to but I don't have time to research that just now and am not sure if it is even possible. BTW, TakeFocus IS set to false on the Form

Regards,
Jay





More information about the User mailing list