Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Graphics and Multimedia
»
Graphics
(Moderator:
Ask
) »
Missing information related to an old release notes
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
WIKI Timeout issues
Please read here if you have trouble connecting to the wiki
Recent
Popup Form to close when ...
by
Thaddy
[
Today
at 02:10:55 pm]
internal Compiler Error
by
marcov
[
Today
at 02:03:29 pm]
Questions about GUID decl...
by
marcov
[
Today
at 01:53:25 pm]
Spikey Splat Creatures fr...
by
Boleeman
[
Today
at 01:19:35 pm]
[Solved]Open Project fail...
by
dbannon
[
Today
at 01:00:41 pm]
Amigo programming languag...
by
paxscript
[
Today
at 12:20:33 pm]
controls.lpr(731,15) Erro...
by
dseligo
[
Today
at 11:44:40 am]
Input Chinese using Micro...
by
momigo
[
Today
at 10:50:40 am]
Ballet of Lines and Dots ...
by
Boleeman
[
Today
at 09:19:59 am]
Using icons in own open s...
by
paule32
[
Today
at 08:14:05 am]
ChatGPT and ObjectPascal ...
by
Thaddy
[
Today
at 07:56:29 am]
control '' has no parent
by
Thaddy
[
Today
at 07:23:07 am]
Converting excel to csv -...
by
andresayang
[
Today
at 01:44:28 am]
Persistent MacOS Arm M ch...
by
BVale
[
Today
at 12:05:12 am]
Original game - 3 Cross
by
TBMan
[
Today
at 12:01:24 am]
Exporting larger files
by
Guser979
[July 08, 2025, 11:55:04 pm]
json goes RichMemo
by
Thaddy
[July 08, 2025, 08:52:20 pm]
MDI ChildForm
by
CharlyTango
[July 08, 2025, 08:41:25 pm]
Fern Leaf Fractal (Recurs...
by
Lulu
[July 08, 2025, 07:54:23 pm]
Trouble compiling fpc for...
by
ermok
[July 08, 2025, 06:21:06 pm]
Feature request: hard typ...
by
440bx
[July 08, 2025, 05:53:44 pm]
Lazarus 4 and TAChart Hin...
by
Nicole
[July 08, 2025, 05:13:38 pm]
Pappas Chain Ring: Not Ro...
by
Boleeman
[July 08, 2025, 01:06:20 pm]
Creating .deb packages fo...
by
CM630
[July 08, 2025, 12:36:36 pm]
Lazarus IDE crashes ( Due...
by
Martin_fr
[July 08, 2025, 11:38:05 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Missing information related to an old release notes (Read 439 times)
jipété
Full Member
Posts: 194
Missing information related to an old release notes
«
on:
May 17, 2025, 06:26:22 pm »
Hello,
Reading these lines (
https://wiki.freepascal.org/Lazarus_1.2.0_release_notes#LCL_TTreeView_with_Images_no_longer_indents_nodes_without_image
), I don't know what to do with the PaintImages parameter found in the last line.
I don't know where it comes from, I don't know how to use it, configure it.
Best regards and thanks for your help.
Logged
TRon
Hero Member
Posts: 4377
Re: Missing information related to an old release notes
«
Reply #1 on:
May 17, 2025, 07:15:10 pm »
I believe the note is referring to method customdrawitem, see
here
.
Each individual node in the tree can have a (valid) image index when the images are set and the event linked in the docs is afaik used to indicate that the image should be drawn (or not).
Check the individual customdraw events in order to see which ones make actual use of the paintimages boolean. As an example,
OnAdvancedcustomdraw
event makes use of it.
«
Last Edit: May 17, 2025, 07:18:25 pm by TRon
»
Logged
Today is tomorrow's yesterday.
jipété
Full Member
Posts: 194
Re: Missing information related to an old release notes
«
Reply #2 on:
May 17, 2025, 07:38:53 pm »
Thank you for your quick response.
Give me a few days to look into this.
Best Regards,
Logged
jipété
Full Member
Posts: 194
Re: Missing information related to an old release notes
«
Reply #3 on:
May 20, 2025, 03:19:16 pm »
Hello,
I found another solution, simpler in my opinion:
Code: Pascal
[Select]
[+]
[-]
procedure
TForm1
.
tv1MouseDown
(
Sender
:
TObject
;
Button
:
TMouseButton
;
Shift
:
TShiftState
;
X
,
Y
:
Integer
)
;
var
tn
,
WorkNode
,
tmpNode
:
TTreeNode
;
s
,
root
,
target
:
string
;
sl
:
TStringList
;
begin
.....
root
:
=
WorkNode
.
Text
+
'/'
+
tn
.
Text
;
// tn is the selected treenode
tv1
.
BeginUpdate
;
for
i
:
=
0
to
sl
.
Count
-
1
do
begin
s
:
=
CleanFolderName
(
sl
[
i
]
)
;
// custom proc for cleaning filelistbox folders (will remove [ & ])
tmpNode
:
=
tv1
.
Items
.
AddChild
(
tv1
.
Selected
,
s
)
;
target
:
=
root
+
'/'
+
tmpNode
.
Text
;
if
IsDirectory
(
target
)
then
with
tmpNode
do
begin
HasChildren
:
=
True
;
StateIndex
:
=
ImgIndexUncheck
;
ImageIndex
:
=
4
;
SelectedIndex
:
=
4
;
end
;
else
if
(
LowerCase
(
ExtractFileExt
(
s
)
)
=
'.ttf'
)
or
(
LowerCase
(
ExtractFileExt
(
s
)
)
=
'.ttc'
)
or
(
LowerCase
(
ExtractFileExt
(
s
)
)
=
'.otf'
)
then
begin
tmpNode
.
ImageIndex
:
=
2
;
tmpNode
.
SelectedIndex
:
=
2
;
end
else
begin
tmpNode
.
ImageIndex
:
=
3
;
tmpNode
.
SelectedIndex
:
=
3
;
end
;
end
;
// for i
tv1
.
EndUpdate
;
.....
end
;
But I can't figure out how to not open the items' label editor : see attached
editing_open.png
Any idea welcome.
«
Last Edit: May 20, 2025, 03:21:32 pm by jipété
»
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Graphics and Multimedia
»
Graphics
(Moderator:
Ask
) »
Missing information related to an old release notes
TinyPortal
© 2005-2018