Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Default selection of a selection tree


4 replies to this topic

_nick_

_nick_
  • Members
  • 34 posts

Posted 10 May 2005 - 19:51

How do I controll the default selection in a selection tree?

For instance, if I am refreshing the dialog (really two dialogs which refresh by referring to each other, s1 -> s2, s2 -> s1) and I set property X linked to the selection tree shouldn't it "remember" it's selection?

FYI - I'm using WiX, the tag I have declared for the selection tree is:

CODE

<Control  Id="Tree" Type="SelectionTree" X="5" Y="49" Width="175" Height="131" Property="BROWSEPROPERTY" Sunken="yes" TabSkip="no" Text="Tree of selections" />


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 May 2005 - 14:22

You mean which features have been selected for local install/run from source/don't install? This should be maintained. Or do you mean the current focus item? This is not maintained, same behaviuor as any control on any other dialog.

_nick_

_nick_
  • Members
  • 34 posts

Posted 11 May 2005 - 14:25

Current focus item, I was afraid you would respond that it couldn't be controlled.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 May 2005 - 14:33

In C++ (for instance) you would have to write code to set the focus to the desired control. But in MSI you don't have code where you could add this. Unless you want to dynamically find the dialog in the window list, then find the treeview control, and finally find a way to out the focus on the entry you wish. And vice versa, as you would have to detect which entry currently has the focus first.

BTW when you click on a button (to switch to the other instance of the dialog) the focus would move to the button control anyway, or?

_nick_

_nick_
  • Members
  • 34 posts

Posted 11 May 2005 - 14:47

Ok, i'm not really being clear on what I'm trying to do.

I have a feature selection tree on the left, and a preview bitmap on the right. I want to show a different preview depending on which item was last clicked (focus and/or selection state if I could get to the tree control in a custom action). I tried subscribing to the SelectionDescription event to set the text attribute of the bitmap control, but that only works for the initial display and won't update it (unless I missed something). Currently I have a series of hidden bitmaps that are conditioned on a property that I set with the selection of the tree. I want the dialog to update and re-evaluate the conditions for these bitmaps. The only suggsetion that I've seen for this is to use 2 identical dialogs, but then I have to preserve the selection.