add icon to web button

Is it possible to add icon to web button?

Please help me how.

[quote=208994:@ronaldo florendo]Is it possible to add icon to web button?

Please help me how.[/quote]

Use a canvas, as described in https://forum.xojo.com/25168-center-button-in-webtoolbar

Hi Michel,

Do you have sample ?

[quote=209040:@ronaldo florendo]Hi Michel,

Do you have sample ?[/quote]

  • Create a webstyle with the characteristics of the button : background color, corners rounded or not, border color, until you are satisfied it looks like the button you want.
  • Drop a WebCanvas onto your page or container
  • Drag the icon in the project (myIcon)
  • In the canvas Paint event, do something like
g.DrawPicture(myIcon, 5,20)
  • Use the MouseUp event as the Action event.
1 Like

Thank you!

Nice one.