[Modules] TileButton Gadget (all OS / DPI)

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

[Modules] TileButton Gadget (all OS / DPI)

Post by Thorsten1867 »

Tile Button Gadget - Module (all OS / DPI / 64Bit)
  • Additional row with description
  • Support for an image
  • Color themes
  • alternatively with arrow and/or switch
  • Toggle button bar
Image Image Image

Code: Select all

; Tiles::AddImage()           - adds an image to the button
; Tiles::CombineToggle()      - combine a group of toggle buttons
; Tiles::Disable()            - similar to 'DisableGadget()'
; Tiles::Free()               - similar to 'FreeGadget()'
; Tiles::Gadget()             - similar to 'ButtonGadget()'
; Tiles::GetData()            - similar to 'GetGadgetData()'
; Tiles::GetID()              - similar to 'GetGadgetData()', but string
; Tiles::GetState()           - similar to 'GetGadgetState()'
; Tiles::GetText()            - similar to 'GetGadgetText()'
; Tiles::SaveColorTheme()     - saves a custom color theme
; Tiles::SetAutoResizeFlags() - [#MoveX|#MoveY|#Width|#Height]
; Tiles::SetAttribute()       - similar to 'SetGadgetAttribute()'
; Tiles::SetColor()           - similar to 'SetGadgetColor()'
; Tiles::SetColorTheme()      - sets a colour theme
; Tiles::SetData()            - similar to 'SetGadgetData()'
; Tiles::SetFont()            - similar to 'SetGadgetFont()'
; Tiles::SetID()              - similar to 'SetGadgetData()', but string
; Tiles::SetState()           - similar to 'SetGadgetState()'
; Tiles::SetText()            - similar to 'SetGadgetText()'
; Tiles::Hide()               - similar to 'HideGadget()'
Download TileButtonModule.pbi
Last edited by Thorsten1867 on Mon May 30, 2022 8:52 am, edited 4 times in total.
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
User avatar
Caronte3D
Addict
Addict
Posts: 1025
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: [Modules] TileButton Gadget (all OS / DPI)

Post by Caronte3D »

Very nice!
Thanks for sharing it! :wink:
punak
User
User
Posts: 63
Joined: Tue Sep 07, 2021 12:08 pm

Re: [Modules] TileButton Gadget (all OS / DPI)

Post by punak »

Excellent and modern. :D I will definitely test it.
Thanks for your efforts.
Last edited by punak on Mon Jun 06, 2022 12:38 pm, edited 1 time in total.
BarryG
Addict
Addict
Posts: 3292
Joined: Thu Apr 18, 2019 8:17 am

Re: [Modules] TileButton Gadget (all OS / DPI)

Post by BarryG »

Screenshots?
Cyllceaux
Enthusiast
Enthusiast
Posts: 458
Joined: Mon Jun 23, 2014 1:18 pm
Contact:

Re: [Modules] TileButton Gadget (all OS / DPI)

Post by Cyllceaux »

BarryG wrote: Sun May 29, 2022 10:05 pmScreenshots?
Are in the first post. :)
tatanas
Enthusiast
Enthusiast
Posts: 198
Joined: Wed Nov 06, 2019 10:28 am
Location: France

Re: [Modules] TileButton Gadget (all OS / DPI)

Post by tatanas »

Hi,
I'm playing with this module and I notice a change in the behaviour with disabled gadget display compared to your other modules.
I've got a black background inside the button (I'm don't use ModuleEx). I am using this tile button as a ButtonImage (32x32) without text.

Is it normal ?
Windows 10 Pro x64
PureBasic 6.04 x64
User avatar
Thorsten1867
Addict
Addict
Posts: 1366
Joined: Wed Aug 24, 2005 4:02 pm
Location: Germany

Re: [Modules] TileButton Gadget (all OS / DPI)

Post by Thorsten1867 »

Bugfix: Disable()
Translated with http://www.DeepL.com/Translator

Download of PureBasic - Modules
Download of PureBasic - Programs

[Windows 11 x64] [PB V5.7x]
tatanas
Enthusiast
Enthusiast
Posts: 198
Joined: Wed Nov 06, 2019 10:28 am
Location: France

Re: [Modules] TileButton Gadget (all OS / DPI)

Post by tatanas »

Thanks !

Do you think you could add a disabled effect on the image too ?

Another thing :
It seems the text is not centered correctly when "text only" is used. I think the problem comes from the "X = GetTextOffset(TileBt()\Title\Width)" in "Draw_" procedure.
The offset value seems insufficient.
Windows 10 Pro x64
PureBasic 6.04 x64
Post Reply