B4A=true
Group=Default Group
ModulesStructureVersion=1
Type=Class
Version=9.85
@EndOfDesignText@
#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_NAME%.zip

'B4A ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=start&Args=..\..\B4A\%PROJECT_NAME%.b4a 
'B4i ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=start&Args=..\..\B4i\%PROJECT_NAME%.b4i 
'B4J ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=start&Args=..\..\B4J\%PROJECT_NAME%.b4j

Sub Class_Globals
	Private Root As B4XView
	Private xui As XUI
	
	Private ltbTest, ltbTest1 As xLimitBar
	Private lblLimitLeft, lblLimitRight As Label
	Private btnChangeProperties As Button
End Sub

Public Sub Initialize
'	B4XPages.GetManager.LogEvents = True
End Sub

Private Sub B4XPage_Created (Root1 As B4XView)
	Root = Root1
	Root.LoadLayout("MainPage")
	
	'adds a second xLimitBar in the code
	ltbTest1.Initialize(Me, "ltbTest1")
	ltbTest1.FrontLineColor = xui.Color_Blue
	lblLimitLeft.Text = ltbTest.LimitLeft
	lblLimitRight.Text = ltbTest.LimitRight
	ltbTest1.AddToParent(Root, 40dip, 120dip, Root.Width - 80dip, 40dip, xui.Color_Red, 10dip)

End Sub

Private Sub B4XPage_Resize (Width As Int, Height As Int)
	'Here, we need to resize the xLimitBar added in the code
	'Only the width is changed we keep the current height
	ltbTest1.Base_Resize(Width - 80dip, ltbTest1.Height)
End Sub

Private Sub ltbTest_ValuesChanged(LimitLeft As Int, LimitRight As Int)
	lblLimitLeft.Text = LimitLeft
	lblLimitRight.Text = LimitRight
End Sub

Private Sub btnChangeProperties_Click
	ltbTest1.Left = 200dip
	ltbTest1.Width = 300dip
	ltbTest1.Height = 70dip
	ltbTest1.BackLineColor = xui.Color_Blue
	ltbTest1.FrontLineColor = xui.Color_Green
	ltbTest1.Max = 150
	ltbTest1.LimitLeft = 20
	ltbTest1.LimitRight = 120
End Sub
