Recent

Author Topic: TEdit - Limit scrolling text length  (Read 2374 times)

tudi_x

  • Hero Member
  • *****
  • Posts: 532
TEdit - Limit scrolling text length
« on: December 29, 2017, 10:28:27 am »
hi All,
for a TEdit when reaching the right side end the text starts to scroll.
i am currently having a TPanel with a TImage on the right and would not want to display text under the image.
how i could instruct TEdit to start the text scroll earlier (set my own border length)?

i would not like to use TEdit.MaxLength as the option limits text length.
thank you and all the best for 2018
Lazarus 2.0.2 64b on Debian LXDE 10

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: TEdit - Limit scrolling text length
« Reply #1 on: December 29, 2017, 11:16:40 am »
Could you not arrange the edit and image so neither one overlaps the other?

tudi_x

  • Hero Member
  • *****
  • Posts: 532
Re: TEdit - Limit scrolling text length
« Reply #2 on: December 29, 2017, 12:16:29 pm »
i came from that approach.
i am asking as i thought it might be something easy achievable as it is closer to the legacy app (Python).
Lazarus 2.0.2 64b on Debian LXDE 10

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: TEdit - Limit scrolling text length
« Reply #3 on: December 29, 2017, 12:38:21 pm »
is that a buttonedit approach? I would suggest to fake it. Use a borderless with a flat speedbutton edit inside a container with borders (panel comes to mind at the moment) just make sure that the container and the tedit have the same color and the speed button's transparent is set to true. You can also set the speedbutton.align to alleft and edit.align to alclient for a more complete illusion.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018