Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3833

Use canvas as button, can insert icon (image) with text?

$
0
0

Complete beginner here, UI designer with no coding experience.
I’m using Mac, want to create a flat button with icon and text. The bevel button can insert icon with text, but i cannot remove the bevel effect.
So I use the canvas to create the flat button, and add event handler “Paint” to set color and text, is there any way to inert a icon image in the button too?

thanks.

//fill.
g.ForeColor = rgb(250,70,22)
g.FillRoundRect(0,0,me.width,me.height,12,12)

//border.
g.ForeColor = rgb(190,70,22)
g.PenHeight = 2
g.PenWidth = 4
g.DrawRoundRect(0,0,me.width,me.height,12,12)

//text.
g.ForeColor = rgb(250,250,250)
g.TextFont = “Helvetica”
g.TextUnit = FontUnits.Point
g.TextSize = 16
g.DrawString(“CLEAR”,13,25)

4 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 3833

Trending Articles