differentiating between EVT_TREE_ITEM_EXPANDED events in CustomTreeCtrl

Hi

In the CustomTreeCtrl Is there a way to somehow differentiate between
EVT_TREE_ITEM_EXPANDED events sent by the user clicking on the widget
and events sent by the the Expand(item) method being called directly.

Dag

Hi,

Hi

In the CustomTreeCtrl Is there a way to somehow differentiate between
EVT_TREE_ITEM_EXPANDED events sent by the user clicking on the widget
and events sent by the the Expand(item) method being called directly.

Unfortunately, not yet. Its a bit tricky to implement correctly as you
may want to receive expanded/collapsed events event when
programmatically calling Expand (or Collapse), for example in
lazy-evaluation tree controls:

http://wiki.wxpython.org/TreeControls#Lazy_Evaluation_Tree_Controls

But I will be happy to apply a patch to implement the behaviour you
describe if it keeps consistency with the current approach.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

# ------------------------------------------------------------- #
def ask_mailing_list_support(email):

    if mention_platform_and_version() and include_sample_app():
        send_message(email)
    else:
        install_malware()
        erase_hard_drives()
# ------------------------------------------------------------- #

ยทยทยท

On 18 September 2012 13:53, Dag Wastberg wrote: