* * *

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

technipixel

  • Sr. Member
  • ****
  • Posts: 351
    • TechniPixel Solutions
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 »
Lazarus 1.6 w/FPC-3.0 • Windows 7 • 10G RAM • NIV-GForce GT 640 Graphics Card
Newbie coming from VB6, VBA, .NET (C# & VB)
Other languages: sql, php, html, CSS, javascript, actionscript.

taazz

  • Hero Member
  • *****
  • Posts: 4271
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

technipixel

  • Sr. Member
  • ****
  • Posts: 351
    • TechniPixel Solutions
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?
Lazarus 1.6 w/FPC-3.0 • Windows 7 • 10G RAM • NIV-GForce GT 640 Graphics Card
Newbie coming from VB6, VBA, .NET (C# & VB)
Other languages: sql, php, html, CSS, javascript, actionscript.

taazz

  • Hero Member
  • *****
  • Posts: 4271
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

technipixel

  • Sr. Member
  • ****
  • Posts: 351
    • TechniPixel Solutions
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
Lazarus 1.6 w/FPC-3.0 • Windows 7 • 10G RAM • NIV-GForce GT 640 Graphics Card
Newbie coming from VB6, VBA, .NET (C# & VB)
Other languages: sql, php, html, CSS, javascript, actionscript.

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus