Recent

Author Topic: All Things... lzRichEdit Control  (Read 3687 times)

pixelink

  • Hero Member
  • *****
  • Posts: 1260
All Things... lzRichEdit Control
« on: July 04, 2017, 08:27:22 pm »
I am building an app with the lzRichEdit control...

First Q...

I see we can do Bullet Lists... but where is the Numbers List??

  • Bullets
  • Bullets
  • Numbers
  • Numbers

Also, for text alignment, we have left, center and right... but NO justify...
even though the WIKI says there is.
« Last Edit: July 04, 2017, 08:32:54 pm by technipixel »
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: All Things... lzRichEdit Control
« Reply #1 on: July 05, 2017, 01:17:38 am »
The code that handle bullets for windows is in the file win32WSRichBox look for the method TWin32WSCustomRichBox.Para_SetNumbering you will quickly see that it handle the PFM_NUMBERING portion of the paragraph structure only which is compatible with all versions of rich edit for compatibility with v3 or newer you have to use the PFM_NUMBERINGSTYLE portion instead. for more info refer to MS documentation at https://msdn.microsoft.com/en-us/library/windows/desktop/bb774276(v=vs.85).aspx and https://msdn.microsoft.com/en-us/library/windows/desktop/bb787942(v=vs.85).aspx.

The preferred way would be to extend the win32wsrichbox and surface it to the lzrichedit control but you can always ignore cross platform and go for the kill

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

pixelink

  • Hero Member
  • *****
  • Posts: 1260
Re: All Things... lzRichEdit Control
« Reply #2 on: July 05, 2017, 03:25:12 am »
Well.. MS stuff wasn't too helpful.
I understand what they are saying, but they only have C++ code for the api.
How am I supposed to translate this to LAZ?

Why isn't the number list already in the lzEdit control?
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: All Things... lzRichEdit Control
« Reply #3 on: July 05, 2017, 05:04:27 am »
Well.. MS stuff wasn't too helpful.
I understand what they are saying, but they only have C++ code for the api.
How am I supposed to translate this to LAZ?

Why isn't the number list already in the lzEdit control?
find attached an experimental version of the richbox.pas unit. This works as expected on windows only. The screen shot says it all.
As you can see the only change required on the control was to extend the set with the extra values. It is up to you to make sure that the values are in the correct order.
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

pixelink

  • Hero Member
  • *****
  • Posts: 1260
Re: All Things... lzRichEdit Control
« Reply #4 on: July 05, 2017, 03:45:38 pm »
Does the numbering list indent like bullets??
The screenshot doesn't show that.

Are you the one who made lzRE??

THANKS
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

 

TinyPortal © 2005-2018