Hi everybody,
I want create image button with 2 lines of text and with one small picture.
First problem is that Label have background, so its look nasty.
Second problem is that Label dont have Click event, so I cant make reaction on it.
I try use DrawString but this works only on Form....
I cant found solution, how create button what I want. Please write me any idea...
Thx.
I want create image button with 2 lines of text and with one small picture.
B4X:
picbutton_Create("Form1","Butt1", 10, 10, 60, 40, "Text1", "Text2",ImageList1.Item(1),ImageList1.Item(0))
Sub picbutton_Create (Owner, Name, Left, Top, Width, Height, Text1, Text2, Background, Picture)
AddPanel(Owner,Name,Left,Top,Width,Height)
AddImage(Name,"im"&Name,0, 0, Width, Height)
Control("im"&Name,Image).Mode = cStretchImage
Control("im"&Name,Image).Transparent = False
Control("im"&Name,Image).Image = Background
pomoc = Round((Height-28)/3)
'AddLabel(Name,"lb1"&Name,23,pomoc+3,Width-25,12,Text1)
'Control("lb1"&Name,Label).FontSize=10
'Control("lb1"&Name,Label).BringToFront
AddLabel(Name,"lb2"&Name,2,2*pomoc+16,Width-4,12,Text2)
'Control("lb2"&Name,Label).FontSize=12
Control("lb2"&Name,Label).BringToFront
AddImage(Name,"ip"&Name,2,pomoc,16,16)
Control("ip"&Name,Image).Image = Picture
Control("ip"&Name,Image).BringToFront
AddEvent("im"&Name,Click,"picbutton_Click")
AddEvent("ip"&Name,Click,"picbutton_Click")
End Sub
First problem is that Label have background, so its look nasty.
Second problem is that Label dont have Click event, so I cant make reaction on it.
I try use DrawString but this works only on Form....
I cant found solution, how create button what I want. Please write me any idea...
Thx.