cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

taking over Adept's standard dialogs

Highlighted
Level 1

taking over Adept's standard dialogs

Todd,

It's true that the modify tag window is not one of the static popup
dialogs, but is created on the fly. This means that you can't really
manipulate the dialog using ACL, and you can't capture any events in
the dialog. So what you're trying to do is not currently supported.

It is possible to hide or deactivate attribute fields and their labels.
You can't change anything, such as the label, or the declared values of
an attribute in a drop-down list, you can only hide or deactivate entire
fields. To do this you would use dlgitem_hide or dlgitem_deactivate
in the modify_tag callback (see the help page for doc_add_callback()).
The dialog item ID is the same as the attribute name, and the item ID
of the label is the attribute name with an underscore prefix.

This would hide the label and value of an attribute named "myattr":

dlgitem_hide(win, "myattr")
dlgitem_hide(win, "_myattr")

You may also deactivate or hide specific buttons in the panel--the
item IDs are the same as the names of the buttons.

Hiding objects leaves gaps in the dialog. The dialog will not
reformat, and these gaps can't be closed. dlgitem_withdraw() may
not be used for this dialog. So it's probably better not to hide
attributes, but to deactivate them - useful, for instance, to prevent
users from modifying IDs or other machine-set metadata.

Paul
Tags (2)
2 REPLIES 2

taking over Adept's standard dialogs

I want to make a modify_tag callback that limits the number of attribute values
shown in a particular Modify Attributes dialog to a valid subset of the list of
legal values. I also want to change the Modify Attributes dialog of another
element to add a different functionality. Both these changes are simple - easy
enough to do in ACL Designer, once you get the hang of it.

However, rather than create a new ACL Designer dialog box for each of these, I'd
by far prefer to tweak Adept's standard boxes. Recalling that there was
something about this in my ACL Designer training, I looked it up in the
documentation, which said I could edit adept.vr. The ACL Designer book says I
can get at all ancillary dialogs in the PopUpDialogs dictionary, and describes
how to remove the Options button from the Spelling dialog. (What I need to do
will involve coding as well as widget-tweaking.) But the Modify Attributes
dialog isn't in adept.vr. (Or I just haven't found it yet!)

I can see how I might take over, say, the Preferences box, and put an array of
the names of the seven dwarfs in the textent_fontclr list box, using
dlgitem_set_list_array in some clever way. This is what I'd like to do with the
Modify Attributes box - replace the attribute list for a couple of the
attributes.

Something tells me that the reason Modify Attributes isn't in the PopUpDialogs
dictionary is that it's created on the fly - each attribute needs its own input
or list box, the label needs to be blue if it's required, and the box needs to
be sized to fit all the attributes - so one dialog wouldn't work. Maybe what I
want is to find the code that actually does a modify_tag, like "function
modify_tag()", but I suspect that's deep under the hood of adept.exe or a dll.
In any case I can't find it in any of the source code.

Is there a way in ACL to address the widgets in Adept's standard dialogs? Is
there a way in ACL Designer to change those widgets?

taking over Adept's standard dialogs

Todd,

It's true that the modify tag window is not one of the static popup
dialogs, but is created on the fly. This means that you can't really
manipulate the dialog using ACL, and you can't capture any events in
the dialog. So what you're trying to do is not currently supported.

It is possible to hide or deactivate attribute fields and their labels.
You can't change anything, such as the label, or the declared values of
an attribute in a drop-down list, you can only hide or deactivate entire
fields. To do this you would use dlgitem_hide or dlgitem_deactivate
in the modify_tag callback (see the help page for doc_add_callback()).
The dialog item ID is the same as the attribute name, and the item ID
of the label is the attribute name with an underscore prefix.

This would hide the label and value of an attribute named "myattr":

dlgitem_hide(win, "myattr")
dlgitem_hide(win, "_myattr")

You may also deactivate or hide specific buttons in the panel--the
item IDs are the same as the names of the buttons.

Hiding objects leaves gaps in the dialog. The dialog will not
reformat, and these gaps can't be closed. dlgitem_withdraw() may
not be used for this dialog. So it's probably better not to hide
attributes, but to deactivate them - useful, for instance, to prevent
users from modifying IDs or other machine-set metadata.

Paul