|
|
#1 (permalink) |
|
Guest
Posts: n/a
|
I have a dialog that contains a SelectionTree and a PathEdit. The PathEdit is
only relevant to one of the Features in the SelectionTree, so I'd like the PathEdit to be disabled unless the user enables the corresponding Feature. So I added the following entries to the the ControlCondition table: SelectFeaturesDlg, PathEdit, Enable, &PythonOther=3 SelectFeaturesDlg, PathEdit, Disable, &PythonOther<>3 I was hoping that when the user changed the status of the feature (e.g. from "unavailable" to "installed"), these conditions would be fired off, and the PathEdit would be enabled when the PythonOther feature is set to be installed. But it seems like these conditions only fire once, when the dialog is started - if PythonOther is initially set to "unavailable", the PathEdit is always disabled, and if PythonOther is initially set to "installed", the PathEdit is always enabled. How can I get these conditions to update each time the user changes their selection for the PythonOther feature? |
|
|
|
#2 (permalink) |
|
Guest
Posts: n/a
|
"Steven Bethard" wrote:
> I have a dialog that contains a SelectionTree and a PathEdit. The PathEdit is > only relevant to one of the Features in the SelectionTree, so I'd like the > PathEdit to be disabled unless the user enables the corresponding Feature. > > So I added the following entries to the the ControlCondition table: > > SelectFeaturesDlg, PathEdit, Enable, &PythonOther=3 > SelectFeaturesDlg, PathEdit, Disable, &PythonOther<>3 > > I was hoping that when the user changed the status of the feature (e.g. from > "unavailable" to "installed"), these conditions would be fired off, and the > PathEdit would be enabled when the PythonOther feature is set to be > installed. But it seems like these conditions only fire once, when the dialog > is started - if PythonOther is initially set to "unavailable", the PathEdit > is always disabled, and if PythonOther is initially set to "installed", the > PathEdit is always enabled. > > How can I get these conditions to update each time the user changes their > selection for the PythonOther feature? I found a workaround. Not sure if this is the right way to go, but... I added a ControlEvent: SelectFeaturesDlg, SelectionTree, [FEATURE], X Then I changed my ControlCondition entries to: SelectFeaturesDlg, PathEdit, Enable, FEATURE AND &PythonOther=3 SelectFeaturesDlg, PathEdit, Disable, FEATURE AND &PythonOther<>3 That seems to work - presumably because while the ControlConditions do not fire off for changes in Feature action states, they do fire off for changes in Property values? I'd be happy to see a less hackish solution to this. =) |
|