Project

General

Profile

Double clicking on group items in WTreeTable for expand/collapse all

Added by Chandana Kumara almost 10 years ago

Hi,

How to develop double click event with WTreeTableNode in WTreeTable?

Regards

Chandana


Replies (3)

RE: Double clicking on group items in WTreeTable for expand/collapse all - Added by Koen Deforche almost 10 years ago

Hey,

You can simply listen to doubleClicked() on a WTreeTableNode::label() ?

Or where do you want to have the double click being reacted on?

Regards,

koen

RE: Double clicking on group items in WTreeTable for expand/collapse all - Added by Chandana Kumara almost 10 years ago

I did not know that funtion. Thank you very much for your reply. I implemented double click event on a lable.

But I have two more questions.

1) It is working with WTreeTableNode::label(). But I need expand or collapse node when double click any where on the row. Can I implement double click for entire row?

2) Node expanded after double click on the label. But the light blue highlighted bar goes invisible when expand the node. Then again I click on same node to select the that node. But highlighted bat not appear. Then I select the another node and again select previous node. Then it selected with light blue highlighted bar. Can show highlighted bar visible on the selected node when it is expand? (Highlighted bar work with collapse the node but not work with expand the node)

RE: Double clicking on group items in WTreeTable for expand/collapse all - Added by Koen Deforche almost 10 years ago

Hey,

You can do the following:

 WContainerWidget *labelParent = dynamic_cast<WContainerWidget *>(label()->parent());
 labelParent->doubleClicked()...

I'm not sure about the issue you see with the selection disappearing ... can you isolate that in a test case?

Selection (of course) does work with an expanded node, see http://www.webtoolkit.eu/widgets/trees-tables/tree-tables

Regards,

koen

    (1-3/3)