Recent

Author Topic: Flat TButton , how?  (Read 2011 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: 1758
Re: Flat TButton , how?
« Reply #2 on: December 17, 2013, 10:40:52 am »
Or even BGRAControls' TBCXButton.
Windows (10, 7) - Lazarus 2.0RC3/FPC 3.2, NewPascal, Delphi

Indy 10.6 series; mORMot; Zeos 7.2.1; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1

PizzaProgram

  • New member
  • *
  • Posts: 6
  • ...developing Delphi apps since 20 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
Laz.V#1.0.14 (2013-11-16) x86_64-win64 --W7