I'm having trouble setting the color of the b4xfloattextfield. I created a sample program to show this. For some reason for a brief second, I can see the color, but is being overlayed by something. In the designer, I defaulted the background color to some other color than white and also tried setting the background color using code.
Any help will be appreciated.
Thanks
Any help will be appreciated.
Thanks
B4XMainPage:
#Region Shared Files
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
#End Region
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private B4XFloatTextField1 As B4XFloatTextField
'Define the bil screen(scn1) and tie it to the screen1 class
Public scn1 As screen1
End Sub
Public Sub Initialize
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root1.LoadLayout("MainPage")
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Sub Button1_Click
'This will call the initialization routine in the scn2 module
scn1.Initialize
B4XPages.AddPage("scn1",scn1)
B4XPages.ShowPage("scn1")
'xui.MsgboxAsync("Hello world!", "B4X")
End Sub
screen1 class:
Sub Class_Globals
Private B4XFloatTextField1 As B4XFloatTextField
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root1.LoadLayout("scn1")
B4XFloatTextField1.mBase.SetColorAndBorder(Colors.Red,1,0x696969,0)
B4XFloatTextField1.Update
B4XFloatTextField1.Text = "This is screen 1"
End Sub
Attachments
Last edited: