POST
|
If you are using text and not an image, why don't you change the display to show "Text Only"? Go into "Customize" and right click the button. And select "Text Only" instead of Default Style. Then it will show the "Name" of the add-in which you can adjust right there. There is probably a way to set that as the default when the tool is added, but I do not know how to do that. thanks this gave me the idea to remove the image attribute from the button tag in config.esriaddinx and this has allowed just the text to show which weirdly has resized the button.
... View more
10-01-2013
11:00 PM
|
0
|
0
|
315
|
POST
|
Yes you can set a button to text only on the toolbar, use the ICommandItem.style property. However, this is not really the original question. You can switch arcmap to display all the buttons bigger in Customize\customize mode under options tab, but the images are still 16X16 so they just look coarser. Having 32x32 icons is long, long overdue... Unless you are willing to do what Neil suggested, you are kid of stuck. thanks doesn't sound ideal does it, i have removed the image attribute from the button tag in config.esriaddinx and this has allowed just the text to show which weirdly has resized the button.
... View more
10-01-2013
10:58 PM
|
0
|
0
|
315
|
POST
|
The size of a standard toolbar button is a user setting in ArcMap. If you want something larger than that then you can create your own custom toolbar control by implementing ICommand and IToolbarControl and creating a UserControl using the standard Form button. I don't use add-ins so I'm not sure if there is an add-in equivalent to that. Thanks for that, I will investigate this approach.
... View more
10-01-2013
10:55 PM
|
0
|
0
|
315
|
POST
|
Hi, I have developed a toolbar with 2 buttons using visual studio 2010 for 10.1, in the buttons i want to have an image that contains text like this [ATTACH=CONFIG]27925[/ATTACH] but when it loads they are squashed into a 16px x 16px square and are completely unreadable Is there anyway to make the button bigger than the defined 16px x 16px? I originally developed it in visual studio 2012 for 10.2 and it worked ok, but due to limitations of 3rd party addins we have to stick with 10.1, any help would be much appreciated. Answer: it seems it is not possible but to achieve it with text only i have removed the image attribute from the button tag in config.esriaddinx and this has allowed just the text to show which weirdly has resized the button.
... View more
10-01-2013
01:59 AM
|
0
|
6
|
698
|
POST
|
Problem solved, there was a link to the old CSS in an include file, updating this to 2.8 worked. thanks for looking:)
... View more
10-15-2012
04:34 AM
|
0
|
0
|
412
|
POST
|
unfortunately the site is all intranet behind firewalls, the code is more than that, but even when i strip it back to the above i still get 2 buttons
dojo.provide("dcc.tool.basemap");
dojo.declare("dcc.tool.basemap", [dijit._Widget], {
parentcontainer: "",
load: function (node, map, file)
{
this.parentcontainer = node;
this.map = map;
this.file= file;
if (typeof this.contentPane == 'undefined')
{
this.contentPane = new dijit.form.Button(
{
label: ' Base Map '
});
listnerArray.push(dojo.connect(this.contentPane.domNode, "onclick", function ()
{
curbmPopup.containernode.OpenPopup();
height = (((curbmPopup.containernode.countmaps / 3) ) * 75) + 10;
dojo.byId("bsmapnode").style.height = height + "px";
dojo.byId("bsmapnode").innerHTML = curbmPopup.containernode.BMHtml;
// set highlighted base map
try
{
dojo.query('#bm_' + curbmPopup.containernode.map.basemap.id)[0].style.border = "2px solid gray"
}
catch (e)
{
}
}));
}
dojo.place(this.contentPane.domNode, node, "first");
dojo.addClass(this.contentPane.domNode, "claro");
if (typeof this.dropDown == 'undefined')
{
this.dropDown = new dijit.TooltipDialog(
{
onClose: function(){ curLoadedPopup.isOpen = false;},
content: '<span style="float:right;position :relative; cursor:pointer;" onclick="dijit.popup.close(curbmPopup);"><img src="' + 'image.gif" alt="X" title="Click to close"/></span><br/><center id="bsmapnode"></center>' ,
style: "width:215px;"
});
dojo.addClass(this.dropDown.domNode, "claro");
this.dropDown.startup();
}
this.dropDown.containernode = this;
curbmPopup = this.dropDown;
curLoadedPopup = this.dropDown;
// load basemaps
this.loadBaseMaps(environmentPath + "dcc_GIS_Config/App_Config/basemaps/"+ this.file, this);
},
OpenPopup: function ()
{
if (curLoadedPopup.isOpen){
curLoadedPopup.isOpen = false;
dijit.popup.close(curLoadedPopup);
}
else
{
if (typeof curLoadedPopup != 'undefined')
{
dijit.popup.close(curLoadedPopup);
}
this.popup = dijit.popup.open(
{
popup: this.dropDown,
around: this.contentPane.domNode,
orient: {
BL: 'TL'
}
});
curLoadedPopup.isOpen= true;
curbmPopup = this.dropDown;
curLoadedPopup = this.dropDown;
}
},
loadBaseMaps: function (jsonpath, node)
{
dojo.xhrGet(
{
url: jsonpath,
load: function (response)
{
node.BMHtml = "";
node.countmaps = 0;
dojo.forEach(response.basemaps, function (entry, index, array)
{
node.BMHtml += '<div id="bm_' + entry.id + '" style=" border:2px solid white; font-size:10px;width :54px;padding:3px; position:relative; float:left; cursor:pointer;" onclick="curbmPopup.containernode.setBaseMap(\'' + entry.URL + '\', \'' + entry.id + '\' , \'' + entry.name + '\' , \'' + entry.type + '\' , \'' + entry.copyright + '\', curbmPopup.containernode.map) ;"> <img width=55 src="' + entry.swatchURL + '"/><center>' + entry.name + '</center></div>';
node.countmaps++;
});
try
{
dojo.query('#bm_' + curbmPopup.containernode.map.basemap.id)[0].style.border = "2px solid gray"
}
catch (e)
{
}
response = null;
return response;
},
error: function (response, ioArgs)
{
response = null;
return response;
},
handleAs: "json"
});
//this.basemapConfig = this.map.dcc.getJson(jsonpath);
//return this.basemapConfig;
},
setBaseMap: function (url, id, name, type, copyright, themap)
{
if (typeof themap.basemap == 'undefined')
{
this.basemapName = themap._layers[themap.layerIds[0]].id;
themap.basemap = themap._layers[themap.layerIds[0]];
}
if (this.basemapName != name) //if map has changed
{
this.basemapId = id;
this.basemapName = name;
this.basemapType = type;
this.url = url;
this.copyright = copyright;
// clear highlighted services
try
{
dojo.query('#bm_' + curbmPopup.containernode.map.basemap.id)[0].style.border = "2px solid white"
}
catch (e)
{
}
try
{
themap.removeLayer(themap.basemap);
}
catch (e)
{
themap.removeLayer(themap.basemap);
}
if (this.basemapType == "ArcGISDynamicMapServiceLayer")
{
themap.basemap = new esri.layers.ArcGISDynamicMapServiceLayer(this.url, {
transparent: true,
id: id
});
}
else if (this.basemapType == "ArcGISTiledMapServiceLayer")
{
themap.basemap = new esri.layers.ArcGISTiledMapServiceLayer(this.url, {
id: id
});
}
themap.basemap = themap.addLayer(themap.basemap, 0);
myLayers[0].Layer= themap.basemap;
myLayers[0].Label = id;
themap.basemap.url = url;
themap.basemap.id = id;
// themap.dcc.layers.basemap.id = id;
dojo.byId("Copyright").innerHTML = this.copyright;
//highlight mapservice
try
{
dojo.query('#bm_' + curbmPopup.containernode.map.basemap.id)[0].style.border = "2px solid gray"
}
catch (e)
{
}
}
}
});
... View more
10-15-2012
02:56 AM
|
0
|
0
|
412
|
POST
|
Did you ever find a solution to this? I am getting the same when trying to upgrade from 1.4. I have narrowed it down to the changes between 2.0 and 2.1 but cannot find out what is causing the extra button. The code i am using is below. this.button = new dijit.form.Button( { label: 'Button' });
... View more
10-15-2012
02:30 AM
|
0
|
0
|
412
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|