Select to view content in your preferred language

ArcPad 10 Toolbar

5216
2
07-17-2012 05:36 AM
DawnPeck
Deactivated User
I have created a custom program for ArcPad.. I have a toolbar that is loaded when ArcPad openes. The user fills out some general inforamtion by selecting a button then when finshed another toolbar is loaded and the old one is removed, however the old toolbar buttons are still displayed and the new toolbar isnt actived until the toolbar ribbon button is clicked. I was wondering if there was a way to automatically display the buttons on a toolbar. I know you can do this the first time opening arcpad by using the apx file but once Arcpad is already open I call and hide several custom toolbars and I always want to see the buttons of my toolbar.

Thanks for any help!
Tags (3)
0 Kudos
2 Replies
JamesNunn
Deactivated User

I'd like to bump this question, I've wondered the same thing and can't find reference to any method or attribute which represents the currently active toolbar.

Also posted at http://gis.stackexchange.com/questions/130519/how-do-i-activate-a-toolbar-in-arcpad

0 Kudos
MosquitoGIS
Frequent Contributor

I have done some major research on this exact subject, and from what I have learned there is only one way to do this.  And that is by using the Apps feature.  I don't know a lot about the Apps feature except that what you do is create a "Shortcut" that attaches to your "ArcPad Today" screen on Mobile Units or "Start Screen" on Windows 8 (Not sure how it works on other windows versions).  But in creating the app you can tell it only use ceratin or custom toolbars and as long as you use that shortcut, it will work.  But if you enter it any other way, it will not. So...

I don't like that idea and since I am stubborn, I decided to see if I could exploit something in a way I can make it work for me.  So here is my own "kinda" workaround using the standard tools.  Perhaps, it may help in what you are trying to accomplish.  My main idea is to keep the standard toolbars in tact as much as possible, So I can load a blank map and have access to all the tools for fixing/troubleshooting or changing things.  When an application loads, I only want the tools to load that are needed for collecting data in that application.  So, here is what I figured out and how I exploited it to work for me.

My findings were:

1. There always has to be one toolbar that shows from the ArcPad,apx file when the program opens (or it picks a default one to show anyway).

2.  It is always the first listed toolbar in the ArcPad.apx that gets stuck.

3.  There is no way that I could find to have a toolbar become activated (or brought to the front).

4.  Adding a button to the toolbar is not a problem, it will appear instantly (without having to re-click the toolbar).

How I Made it work for me:

1.  I created a new toolbar in the ArcPad.apx file.

2.  This toolbar is the very first toolbar and has no buttons (it has a unique name and is marked as visible).  No other changes are made to the ArcPad,apx file.

Example:     

<TOOLBAR name="MadToolbar" caption="Mad Toolbar" visible="true" image="Mosquito.ico"/>

OR

<TOOLBAR name="MadToolbar" caption="Mad Toolbar" visible="true" image="Mosquito.ico">

</TOOLBAR>

3.  In the *.apm file, I set all the other toolbars visibility to false and this is where I place the buttons into (build) my toolbar.

Example:

<TOOLBARS align="top">

<TOOLBAR name="Main" caption="$MainTools" visible="False" image="$file"/>

<TOOLBAR name="Browse" caption="$BrowseTools" visible="False" image="$browse"/>

<TOOLBAR name="Draw" caption="$DrawingTools" visible="False" image="$pen"/>

<TOOLBAR name="Navigation" caption="$NavigationTools" visible="False" image="navigation"/>

<TOOLBAR name="QuickCapture" caption="MadToolbar" visible="False" image="Mosquito.ico"/>

<TOOLBAR name="MadToolbar" caption="Mad Toolbar" visible="True" image="Mosquito.ico">

     <TOOLBUTTON command="modezoomin">

          <MENUITEM command="modezoomin"/>

          <MENUITEM command="modezoomout"/>

          <SEPARATOR/>

          <MENUITEM command="modepan"/>

          <SEPARATOR/>

          <MENUITEM command="zoomfullextent"/>

     </TOOLBUTTON>

     Etc........

What this does is gives the blank toolbar the "stuck issue" (since it is the first toolbar in your Arcpad.apx) but impregnates it with what buttons you program into it in through the *.apm (I assume you could do the same thing via script, but have not tested it.).  Effectively, working around the sticking/non-refreshing/non-activating toolbar, while getting the tools you want to display on it instead of some other toolbar you have to click off of and then back onto.

Of course, this does mean you have to create the toolbar in all of your *.apm's.  Although not a huge deal.  And if I open a blank ArcPad Document, it still displays all the default toolbars with one extra toolbar at the front that is completely blank.  It is not perfect by any means, but still... Mission Accomplished! 

0 Kudos