Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-10

Treeview Node Image disappears on selected node.

6 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Is this another LCL bug or not?

See the attached image. The selected node's normal image (not the state image) is not painted for the selected node. I'm using the latest Lazarus 0.9.30.x compiled with FPC 2.5.1 using GTK2 widgetset.

In the attached image, the selected node (Test Suite 1 -> Test1) should have had a green square node image. As soon as I click on any other node in the treeview, that new selected node's image disappears, and the previously selected node's image appears.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net -------------- next part -------------- A non-text attachment was scrubbed... Name: treeview_form_gets_focus.png Type: image/png Size: 12406 bytes Desc: not available URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20111025/467211e1/attachment.png>

Reply by email

zeljko
to Graeme Geldenhuys
Graeme Geldenhuys wrote 7 lines
Hi, Is this another LCL bug or not? See the attached image. The selected node's normal image (not the state image) is not painted for the selected node. I'm using the latest Lazarus 0.9.30.x compiled with FPC 2.5.1 using GTK2 widgetset.

Yes, that's why I'm using state images all the time , don't know is this bug or not, maybe someone else with more knowledge on Delphi TTreeView knows more about it.

zeljko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20111025/bb36f727/attachment.html>

Reply by email

cobines
to Graeme Geldenhuys: Is this another LCL bug or not? See the attached image. The selected node's normal image…

2011/10/25 Graeme Geldenhuys :

See the attached image. The selected node's normal image (not the state image) is not painted for the selected node. I'm using the latest Lazarus 0.9.30.x compiled with FPC 2.5.1 using GTK2 widgetset.

The TreeNode has ImageIndex and SelectedIndex. First image is displayed when node is not selected, second is displayed when image is selected. If you want the image to be always displayed set both indexes to the same value.

cobines

Reply by email

Graeme Geldenhuys
to zeljko: Yes, that's why I'm using state images all the time , don't know is this bug or not,…
zeljko wrote
Yes, that's why I'm using state images all the time , don't know is this bug or not,

In that case, it clearly seems like a bug. Because with this behaviour (and your suggestion), I can't share TTreeview code between LCL and VCL, which uses both image list properties of TTreeview.

Also, in Delphi the state images appear on the far left, not on the far right. Here is a screenshot of TTreeview under Delphi.

http://members.optusnet.com.au/mcnabp/Projects/DUnit2/DUnit2Description.html#DUnit2_Unit_Test_Suite

Regards, ? - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net

Reply by email

Graeme Geldenhuys
to cobines: 2011/10/25 Graeme Geldenhuys : The TreeNode has ImageIndex and SelectedIndex. First image…
cobines wrote 5 lines
The TreeNode has ImageIndex and SelectedIndex. First image is displayed when node is not selected, second is displayed when image is selected. If you want the image to be always displayed set both indexes to the same value.

Ah thanks for the explanation. Is that how Delphi works too?

Regards, ? - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net

Reply by email

Unknown author
to Graeme Geldenhuys
Graeme Geldenhuys wrote 9 lines
On 25 October 2011 16:44, cobines wrote: > > The TreeNode has ImageIndex and SelectedIndex. First image is > displayed when node is not selected, second is displayed when image is > selected. If you want the image to be always displayed set both > indexes to the same value. Ah thanks for the explanation. Is that how Delphi works too?

Yes.

Michael.

Reply by email