cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sm_337
Level 4

Disable & Unselect items in FeatureTree

How can I dynamically disable & deselect items in Feature tree dialiog (displayed by sdFeatureTree()) through InstallScript?
I want grayed and disabled items in tree.
Labels (1)
0 Kudos
(13) Replies
K0NFUZIUS
Level 5

Hello,
Do you have an InstallScript Project or do you like to use Installscript in a basic msi project to enable or disable features?

I had the same problem in the past and and have found a workaround (basic msi)
I set an internal Property e.g. "NotInstallFeature1" via Installscript to TRUE
In the Feature definition I'd added a Condition
"Level 200 -> Condition NotInstallFeature1"
So if the property is set to true the Feature gets an Installlevel of 200 and would be displayed as "not Install"

You have to be sure that the INSTALLLEVEL Property for the project is not set to 200 or higher(default is 100).

BR
Jörg
0 Kudos
sm_337
Level 4

K0NFUZIUS wrote:
Hello,
Do you have an InstallScript Project or do you like to use Installscript in a basic msi project to enable or disable features?

I had the same problem in the past and and have found a workaround (basic msi)
I set an internal Property e.g. "NotInstallFeature1" via Installscript to TRUE
In the Feature definition I'd added a Condition
"Level 200 -> Condition NotInstallFeature1"
So if the property is set to true the Feature gets an Installlevel of 200 and would be displayed as "not Install"

You have to be sure that the INSTALLLEVEL Property for the project is not set to 200 or higher(default is 100).

BR
Jörg


I have an InstallScript project.
0 Kudos
sm_337
Level 4

Any ideas?
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

You can select/deselect features through the FeatureSelectItem function. The only way a feature item can be disabled is if it is a required feature. You can hide or show features on the feature selection dialog with the FeatureSetData function.
0 Kudos
sm_337
Level 4

joshstechnij wrote:
You can select/deselect features through the FeatureSelectItem function. The only way a feature item can be disabled is if it is a required feature. You can hide or show features on the feature selection dialog with the FeatureSetData function.


Is there any solution how to disable deselected element in the tree (through InstallScript)?

Maybe defining my own treeview component?
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

The only way to have a feature item in the selection tree disabled is by marking it as a required feature in the IDE.

You can certainly implement your own selection tree if the standard one is not sufficient.
0 Kudos
sm_337
Level 4

joshstechnij wrote:
You can select/deselect features through the FeatureSelectItem function. The only way a feature item can be disabled is if it is a required feature. You can hide or show features on the feature selection dialog with the FeatureSetData function.


Is there any solution how to disable deselected element through InstallScript?

Maybe custom treeview component ?
0 Kudos
sm_337
Level 4

joshstechnij wrote:
You can select/deselect features through the FeatureSelectItem function. The only way a feature item can be disabled is if it is a required feature. You can hide or show features on the feature selection dialog with the FeatureSetData function.


Is there any solution how to disable unselected items through InstallScript?

May be custom treeview component?
0 Kudos
sm_337
Level 4

joshstechnij wrote:
The only way to have a feature item in the selection tree disabled is by marking it as a required feature in the IDE.

You can certainly implement your own selection tree if the standard one is not sufficient.


Any useful links?
0 Kudos
sm_337
Level 4

sm_337 wrote:
Any useful links?


I need an example of custom TreeView component....
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

InstallScript does not provide built-in functionality for working with tree controls (the tree control on SdFeatureTree is mostly handled in C++). There is some sample code on InstallSite.org (Dialog with TreeView Control) that provides a basis for working with custom treeview implementations through Win32 APIs. Note that InstallSite is run by a third party and not supported by Acresso.
0 Kudos
sm_337
Level 4

joshstechnij wrote:
InstallScript does not provide built-in functionality for working with tree controls (the tree control on SdFeatureTree is mostly handled in C++). There is some sample code on InstallSite.org (Dialog with TreeView Control) that provides a basis for working with custom treeview implementations through Win32 APIs. Note that InstallSite is run by a third party and not supported by Acresso.


Thanks. I have already found this component.
0 Kudos
sm_337
Level 4

Thanks. I have already found this component.
0 Kudos