Recent

Author Topic: [SOLVED] Memo And Overlaid Image  (Read 8137 times)

Bazzao

  • Full Member
  • ***
  • Posts: 178
  • Pies are squared.
Re: Memo And Overlaid Image
« Reply #15 on: September 03, 2017, 07:48:46 am »
Well the solution we have reached is the current view of TMemo can easily be hidden behind broken glass - where it belongs.

Mind you I have yet to test it with scrollbar(s) visible, but that was outside the scope of the question.

Changing it to TLabel would mean determining the first and last lines visible. And possibly much more complications.

But an exercise by itself on TLabel with multiple lines is one for the "Maybe Later" pile.

Another exercise is a Transparent TLabel in front of a TMemo, with the visible text duplicated. Would the text align? Or would it be blurry and possibly 3D, if 3D glasses were worn? Do we need text leaping out at you?  :o

B
Bazza

Lazarus 2.0.10; FPC 3.2.0; SVN Revision 63526; x86_64-win64-win32/win64
Windows 10.

RAW

  • Hero Member
  • *****
  • Posts: 868
Re: Memo And Overlaid Image
« Reply #16 on: September 03, 2017, 08:37:15 am »
Quote
Changing it to TLabel would mean determining the first and last lines visible. And possibly much more complications.
It's easy to use a TLabel inside a TPanel, so you only have to set the panel to clBlue and choose the right height and width. You can scroll the TLabel inside the panel. No first line or last line stuff needed... but there are always a lot solutions possible ... (you can always draw everything yourself or use different ready to use controls...)

Quote
Another exercise is a Transparent TLabel in front of a TMemo, ...
I don't really see the reason for that... If you already have got a Label, then you don't need a memo anymore... And if you use Canvas TextOut, then you don't need a TImage or TLabel at all. No control is needed for showing some text...
Windows 7 Pro (x64 Sp1) & Windows XP Pro (x86 Sp3).

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Memo And Overlaid Image
« Reply #17 on: September 03, 2017, 08:40:11 am »
Another exercise is a Transparent TLabel in front of a TMemo, with the visible text duplicated.  :o
Tlabel inherits from TGraphicControl too.

Would the text align?
yes and no. if you manage to place the label in the correct spot and use the same font, size etc then yes it should align perfectly. No the correct spot is not the upper left corner of tmemo.

Or would it be blurry and possibly 3D, if 3D glasses were worn? Do we need text leaping out at you?
not blurry per see but if you offset the label for a pixel or two should create the 3d effect you theorise.
« Last Edit: September 03, 2017, 08:44:41 am by taazz »
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