Page 1 of 1

StateImage and Spacebar

Posted: 16 Oct 2013, 11:44
by Mex
Hi

I think I found a bug or maybe it's a feature :)

1) Add some nodes with stateimage set to 0
2) select node and press spacebar - state image is set to 1 and now i can check/uncheck it


Regards;
Meelis

Re: StateImage and Spacebar

Posted: 16 Oct 2013, 12:25
by TiKu
Hi,

I currently don't have access to the source code, but if I remember the implementation correctly, the native tree view control doesn't have explicit support for state image 0. And it assumes that the state image always is a check box. So I would call it "missing functionality".
You can use the ItemStateImageChanging event to suppress changing the state image from 0 to 1. The OptionTreeView sample should demonstrate how to do it.

Regards
TiKu

Re: StateImage and Spacebar

Posted: 16 Oct 2013, 12:52
by Mex
TiKu wrote:Hi,

I currently don't have access to the source code, but if I remember the implementation correctly, the native tree view control doesn't have explicit support for state image 0. And it assumes that the state image always is a check box. So I would call it "missing functionality".
You can use the ItemStateImageChanging event to suppress changing the state image from 0 to 1. The OptionTreeView sample should demonstrate how to do it.

Regards
TiKu
Thnx and thats exactly what I'm using for a workaround :)


Meelis