[Users] Dynamic toolbar buttons for vector editing - how?

David E. Reksten der at dod.no
Tue Sep 28 21:31:50 CEST 2010


Hi,

I have an application where users can add one or many vector layers to
the base map. I have a treePanel with radio buttons that lets the
users activate one of their vector layers. This works very well.

When a layer is activated, I want to enable a couple of buttons on the
toolbar (bbar on the mapPanel) to allow drawing and editing polygons.
When there are no user defined vector layers available (ie., none
selected), I want the buttons to either disappear or to be disabled.
What is the best strategy for this?

I have tried to set up "dummy" buttons on the toolbar and dynamically
set their "control" and "map" properties when the selected vector
layer changes, but cannot get it to work.

Regards,
.david

PS: Big thanks to the GeoExt team for all the hard work and congrats
for v1rc1 :-)


More information about the Users mailing list