Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X
I am using version 5.3. I want to remap a toolbar button to a custom function. In the help, it states I can map a toobar item (such as Toolbar_Print) in Unix only. How do I accomplish the same thing in Windows? Thanks in advance.
Thanks Clay that worked. On a side note, is there a way to create a custom toolbar item and define your own function. Currently I am having to "steal" a toolbar function from another item I am not using and redefining it. Ideally I would like to do the following:
<toolbar id="toolbar1" name="&ToolbarEdit;" x="0" y="0">
....
<button command="ACLCustomFunction" id="Toolbar_NewItem" image="imageNewItem"<br"/>statustext="New Item"
tiptext="New Item"></button>
If I try and do the above it doesn't know about ACLCustomFunction.
Thanks again.
Hi John,
If you go the $APTCUSTOM/dialogs/editwindow.xml route, not only can you remap toolbar buttons you can add your own custom toolbars by adding new <imagelist> and <toolbar> elements to editwindow.xml.
Create and reference the custom image file and buttons in the new <imagelist> element:
<imagelist path="ToolbarMyCustom.bmp" imagewidth="16">
<image id="imageCustom1"/>
<image id="imageCustom2"/>
...
</imagelist>
BTW, imagewidth can be larger than 16 for large buttons.
Create and reference the custom command buttons in the new <toolbar> element:
<toolbar dock="none" id="toolbarMyCustom" name="My" custom"=" withdraw="true" x="0"<br"/>y="130">
<button id="Toolbar_Custom1" statustext="Custom1" status"=" tiptext="Custom1" tip"=" image="imageCustom1" command="MyCustom1Function1.acl"></button>
<separator/>
<button id="Toolbar_Custom2" statustext="Custom2" status"=" tiptext="Custom2" tip"=" image="imageCustom2" command="MyCustom1Function2.acl"></button>
...
</toolbar>
Here's the function I use to show/hide custom toolbars:
function show_hide_custom_toolbar(tb) {
# custom toolbar (tb) must be defined in APTCUSTOM/dialogs/editwindow.xml
# initial setting WITHDRAW=1
local x=dlgitem_get(current_window(),tb,'WITHDRAW');
if (x==1) {
dlgitem_set(current_window(),tb,'WITHDRAW','0');
dlgitem_set(current_window(),tb,'VISIBLE','1');
return;
}
local a=dlgitem_get(current_window(),tb,'VISIBLE');
if (a==0) {
dlgitem_set(current_window(),tb,'VISIBLE','1');
}else if (a==1) {
dlgitem_set(current_window(),tb,'VISIBLE','0');
}
}
Lou Argyres
CEB.com
Oakland, CA