setEnabled & TreeView


#1

Hi all,

is there a way to disable a treeview like you disable a button or a list or …
at certain states of my application I want to disable any clicks in the treeview I have.

  • bram

#2

IIRC the TreeView ignores the enablement state… But it probably should take notice of it, TBH. If I have a moment I’ll look at that.


#3

Thanks Jules, that would be really helpful!

  • bram

#4

Hey jules,

Thanks for adding this.

Now, it would be extra nice if I could somehow show the user that the treeview is disabled.
Is there a way to forward the enabled/disabled state to the treeviewitem and then use that in the treeviewitem’s to paint things in a different color?

I.e. my listbox paints itself in grey (well, the component I’m using for each list item does that), but for the tree view I’ll need something else…

cheers,

  • bram

#5

TreeViewItem::getOwnerView()->isEnabled()?


#6

I have a disabled text editor [TextEditor::setEnabled(false)] . How can I still make it a key listener? Trying to implement Copy function using short cut keys on a disabled text editor.


#7

Maybe making it read-only would make more sense than disabling it?


#8

Hi Jules,

Thanks for the response. I would be lokoing at that implementation. But also I would like to know the methods that would still work on a disabled component. And whether with my text editor staying disabled, I would still be able to get its data.