Su gentile richiesta di Luca Colombo ho modificato la classe ClassMyButton, ora è possibile inserire una label dove il bottone stesso ne eredita i suoi valori di cui TextSize, TextColor, TextType.
Se servono delle nuove modifiche o richieste basta chiedere come ha fatto Luca Colombo.
B4X:
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
Dim iml As ClassMyLayout
Dim imb As ClassMyButton
Dim Panel1 As Panel
Dim Panel2 As Panel
Dim lbl As Label
Dim Panel3 As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Main")
imb.Initialize
iml.Initialize
iml.SettingLayoutPanel(Activity,Panel1)
lbl.Initialize("")
lbl.Text = "ClassMyButton"
lbl.TextColor = Colors.White
lbl.TextSize = 14
lbl.Typeface = Typeface.DEFAULT_BOLD
imb.NewButton4(Panel2,lbl.Text,"",255,50,100,110,True,1,False,lbl)
lbl.TextSize = 34
lbl.TextColor = Colors.ARGB(200,222,222,222)
imb.NewButton4(Panel3,lbl.Text,"Maps.png",255,50,100,110,True,1,False,lbl)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Se servono delle nuove modifiche o richieste basta chiedere come ha fatto Luca Colombo.
Attachments
Last edited: