Recent

Author Topic: Adding wordwrap property to Tbutton in Linux  (Read 3385 times)

Roosters

  • New Member
  • *
  • Posts: 16
Adding wordwrap property to Tbutton in Linux
« on: July 17, 2012, 10:55:00 am »
I'm converting a windows program to Linux and MUST have a button capable of displaying text on multiple lines, in Windows I managed this by using "BS_MULTILINE", is there a way to do this in Linux ?

I'm currently using GTK2, never programmed for Linux with Lazarus so am unfamiliar with the way's things are done (eg api).



 

tk

  • Sr. Member
  • ****
  • Posts: 364
Re: Adding wordwrap property to Tbutton in Linux
« Reply #1 on: June 15, 2014, 11:31:25 pm »
Just found this thread without answer, is the WordWrap property about to be implemented later for buttons?

I would need it for TBitBtn.

(If not I'll consider to implement my own TBitBtn. I shortly looked into LCL source and it is not a customdrawn control at LCL level, at least not easy to override. Much easier to me now to make my custom control. It might be later part of KControls.)

tk

zeljko

  • Hero Member
  • *****
  • Posts: 1081
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Adding wordwrap property to Tbutton in Linux
« Reply #2 on: June 16, 2014, 09:32:34 am »
Just found this thread without answer, is the WordWrap property about to be implemented later for buttons?

No, buttons (TButton and TBitBtn) are widgetset part.Most of ws does not support multiline (maybe win32 only).
If you need it badly, better implement your own control.

zeljko

tk

  • Sr. Member
  • ****
  • Posts: 364
Re: Adding wordwrap property to Tbutton in Linux
« Reply #3 on: July 28, 2015, 10:33:36 pm »
Just a quick reply:

WordWrap is already available in KBitBtn from KControls.

zbyna

  • New Member
  • *
  • Posts: 46
Re: Adding wordwrap property to Tbutton in Linux
« Reply #4 on: September 02, 2015, 07:33:27 pm »
Thanks, appreciate your work.

lagprogramming

  • Full Member
  • ***
  • Posts: 159
Re: Adding wordwrap property to Tbutton in Linux
« Reply #5 on: September 02, 2015, 08:05:26 pm »
Code: [Select]
TButton.Caption:='1'+system.LineEnding+'2';Shows two lines in GTK2.
What are you precisely talking about, can you reformulate?

Edit: Ooo....I see...wordwrap property.   %)
« Last Edit: September 02, 2015, 08:07:59 pm by lagprogramming »