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
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
What WinAPI functions can...
by
PascalDragon
[
Today
at 02:52:05 pm]
Why is -Cg forced and can...
by
PascalDragon
[
Today
at 02:30:26 pm]
DBF / DBGRID
by
Petrus Vorster
[
Today
at 02:23:37 pm]
TTask 'file not found' er...
by
sollapse
[
Today
at 01:34:50 pm]
Variable number of button...
by
MaxCuriosus
[
Today
at 01:06:37 pm]
Sqlite & Zeos
by
cdbc
[
Today
at 01:05:42 pm]
OpenDialog is too big and...
by
wp
[
Today
at 12:48:29 pm]
[SOLVED] Shenanigans with...
by
Gustavo 'Gus' Carreno
[
Today
at 12:32:00 pm]
Color change without cons...
by
HMM
[
Today
at 12:18:15 pm]
[SOLVED] Are there units ...
by
Gustavo 'Gus' Carreno
[
Today
at 11:16:37 am]
Loop Iteration Speed Test
by
paweld
[
Today
at 11:13:59 am]
Has anyone loaded ReactOS...
by
Thaddy
[
Today
at 10:51:44 am]
Status and Maintenance of...
by
Thaddy
[
Today
at 09:53:53 am]
Inheritance of Classes th...
by
Thaddy
[
Today
at 09:31:25 am]
Trouble compiling fpc for...
by
ermok
[
Today
at 09:22:20 am]
A Tutorial for LazReport
by
Thaddy
[
Today
at 09:12:25 am]
LAMW complaining about "A...
by
Alcatiz
[
Today
at 08:03:36 am]
Hints for method name mis...
by
CM630
[
Today
at 07:55:47 am]
Has the function of findi...
by
gary
[
Today
at 06:02:48 am]
TaurusTLS 1.0.0.25 beta 2...
by
J. Peter Mugaas
[
Today
at 05:26:43 am]
My second "paint" program
by
TBMan
[
Today
at 04:13:41 am]
Zeos 8, Acces violation
by
incendio
[
Today
at 04:08:35 am]
Opencv version 4.6 C++ AP...
by
Mongkey
[
Today
at 02:39:07 am]
TBitBtn no longer shows g...
by
wp
[
Today
at 01:09:04 am]
Modbus summary thread
by
bobby100
[June 22, 2025, 11:18:35 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Missing information related to an old release notes (Read 422 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