that's where subclassed controls come in handy... whenever we do a multi-platform-project, we never just use the built-in controls.
1. new project
2. add class 'MyPushButton', set super to: PushButton
3. edit 'MyPushButton':
- AddEventDefinition 'OnOpen'
- edit the Open-Event-handler:
#if TargetWin32 then
me.Height = 20
#if TargetLinux then
me.Height = 30
#if TargetMacOS then
me.Height = 24
4. Add 'MyPushButton' to your window (you find it in 'ProjectControls', not in 'BuiltIn-Controls')
Now all 'MyPushButtons' will auto-magically have the height you desire.
anything you want on the 'Open-Event', you place in you 'OnOpen'-Event-handler
If you want to change the look&feel, all you need to edit is the Class 'MyPushButton' - and all your 'MyPushButtons' will be fine.
This example only shows the how to set a custom 'Height'. You would of course add/change fonts and what-ever behavior you want/need...
another nice thing: if somewhen a behavior of a control should be broken in RB - or if you want to add something to all your 'MyPushButtons' (e.g.: mouse-cursor), you can "easily" work around it in your own class...
any other workaround to 'fix' that strange text behaviour on linux ?
i've so many buttons, editfield, statictext ... and so on ...
If you decide to write your own 'MyPushButton': with a bit of luck, it might work to change your existing Buttons quite fast with a "Search All & Replace"...