Recent

Author Topic: Flat TButton , how?  (Read 3932 times)

airpas

  • Full Member
  • ***
  • Posts: 179
Flat TButton , how?
« on: December 17, 2013, 09:29:04 am »
hi
there is no property to make tbutton flat ,so i tried adding BS_FLAT to the tbutton style with GetWindowLong and SetWindowLong  but seems not working or the stye dosen't set properly.
with native win32 api it works fine , just passing ( WS_VISIBLE or WS_CHILD or BS_FLAT ) to CreateWindowEx .


Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: Flat TButton , how?
« Reply #1 on: December 17, 2013, 10:34:36 am »
Can you use TSpeedButton?  It has property Flat.
Lazarus Trunk / fpc 2.6.2 / Win32

JD

  • Hero Member
  • *****
  • Posts: 1848
Re: Flat TButton , how?
« Reply #2 on: December 17, 2013, 10:40:52 am »
Or even BGRAControls' TBCXButton.
Windows - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe),
Linux Mint - Lazarus 2.1/FPC 3.2 (built using fpcupdeluxe)

mORMot; Zeos 8; SQLite, PostgreSQL & MariaDB; VirtualTreeView

PizzaProgram

  • Jr. Member
  • **
  • Posts: 53
  • ...developing Delphi apps since 25 years.
Re: Flat TButton , how?
« Reply #3 on: December 20, 2013, 10:49:21 am »
Just a crazy idea:
 Use TLabel instead of TButton.
- it is flat
- can handle OnClick
- easy to color the background  :D
x86_64-win64 --Win7 PRO 64bit HUN

 

TinyPortal © 2005-2018