Recent

Author Topic: How can I change tedit selected text format??  (Read 6656 times)

wpflum

  • Sr. Member
  • ****
  • Posts: 287
How can I change tedit selected text format??
« on: September 14, 2010, 03:32:39 pm »
I'm trying to duplicate an emulated terminal running a transaction entry program from a server so we can run a version of it when the main system is down.  The edit fields on the original screen have their entire text selected when tabbed into, no problem I just set the auto select property and bingo selected text.  The problem is cosmetic where on the original screens the selected text is underlined, actually just first letter is underlined, on the a tedit the text changes color to indicate that it is selected.  Is there anyway to change the format of selected text??  I can live with the entire field being underlined but I'd like to keep the visual look as similar as possible compared to the original program.  Am I missing a property somewhere I can set???  While I'm waiting for elucidation from this illustrious group I'm going to walk through the tedits properties on a program line after the period since Lazarus does not seem to show such an option but I've seen a few times where not all of the properties or functions that an object has show up on the IDE, maybe I'll get lucky  ;)

mas steindorff

  • Hero Member
  • *****
  • Posts: 560
Re: How can I change tedit selected text format??
« Reply #1 on: September 14, 2010, 06:35:37 pm »
Tedit.font.style.fsUnderline := True will do the whole tedit.

you can do the whole form with the tform.font.... but the tedit box I tested with remained unchanged.  I changed the .parentfont setting while playing with it so it did not change with all the rest. (hint)
windows 10 &11, Ubuntu 21+ IDE 3.4 general releases

wpflum

  • Sr. Member
  • ****
  • Posts: 287
Re: How can I change tedit selected text format??
« Reply #2 on: September 14, 2010, 07:46:34 pm »
I set this on one Tedit from the IDE to see what would happen but I still see the Block select not an underline  :-[

If this had worked wouldn't it have just underlined the text as well as block highlighting it or is this supposed to override the select text format??

mas steindorff

  • Hero Member
  • *****
  • Posts: 560
Re: How can I change tedit selected text format??
« Reply #3 on: September 14, 2010, 07:55:56 pm »
I set this on one Tedit from the IDE to see what would happen but I still see the Block select not an underline  :-[

If this had worked wouldn't it have just underlined the text as well as block highlighting it or is this supposed to override the select text format??

how do you know?  the underline color and the block select color are the same on my system.  maybe you need to play with .font.color to see the underline.
windows 10 &11, Ubuntu 21+ IDE 3.4 general releases

wpflum

  • Sr. Member
  • ****
  • Posts: 287
Re: How can I change tedit selected text format??
« Reply #4 on: September 14, 2010, 08:12:22 pm »
I want to turn OFF the block color and only have the underline when the text is selected so if the block color and the underline color are the same then it's a moot point.  ;)


 

TinyPortal © 2005-2018