How can I change the style of my new widget?

363
15
Jump to solution
01-03-2019 01:52 AM
Ángel_DanielSuárez_Calero
New Contributor III

 

Hi, I've made my first widget and wanted to change the style of some elements, such as a button but I can´t get any results.

My html code for the "Consulta" button of the image is:

<button type="button" class="boton" name="button" id="btnConsulta">Consulta</button>

and its css:


#boton {
left: 60px;
color: black;

}

 

Sorry but my level of developing widgets is low and I'm sure I'm making a lot of mistakes.

 

Thank you!

0 Kudos
15 Replies
Ángel_DanielSuárez_Calero
New Contributor III

Hello Robert, thank you very much for fixing my widget, thanks to you I have learned more about Dojo and my widget works 100%. On the other hand, I've been testing another widget of yours, "Zoomgrid" and it works correctly, but I wanted to know if it's possible to hide the layer in the "Layerlist widget". I attached the "Zoomgrid" in this link: https://drive.google.com/open?id=1765kf1iaTj6MdIRG8uustdMJnlGr0wyA.

Thanks for all !       

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Angel,

   Sure add this new line (line 5) to the widget.js:

this.statesLayer = new FeatureLayer("https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5", {
  mode: FeatureLayer.MODE_SELECTION,
  outFields: ["ObjectID", "STATE_NAME", "POP2000"]
});
lang.setObject('_wabProperties.isTemporaryLayer', true, this.statesLayer);‍‍‍‍‍

Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.

Ángel_DanielSuárez_Calero
New Contributor III

This works correctly in the widget, thanks again Robert

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.

View solution in original post

Ángel_DanielSuárez_Calero
New Contributor III

I think that I clicked on the "Mark Correct"  now , this is correct? 

Thanks and sorry  

RobertScheitlin__GISP
MVP Esteemed Contributor

Now you got it.

0 Kudos