UI.Splitpane
From GiderosMobile
Available since: Gideros 2023.1
Class: UI
Description
Creates a Splitpane widget.
UI.Splitpane.new(vertical)
Parameters
vertical: (bool) is it a vertical Splitpane widget (default = false)
Example
local demo=UI.Builder({
class=UI.Dialog,
layoutModel=UI.Layout.Vertical,
layout={fill=1},
children={
{ class=UI.Label, Text="Gideros WidgetKit demo" },
{ class=UI.Label, Text="" },
{ class=UI.Splitpane, Vertical=false, layout={ weighty=1, weightx=1, insetTop=16, insetBottom=16 },
Tabs={.05,1,0.95},
Ratio=.2,
First={ --Left side
class=UI.Viewport,
layoutModel=UI.Layout.Vertical,
layout={weightx=1,fill=1},
children={
{ class=UI.Label, Text="Multiline text:" },
{ class=UI.Viewport, layout={weighty=2,fill=1},
Content={
class=UI.TextField,
layout={fill=1},
TextLayout={ flags=FontBase.TLF_TOP|FontBase.TLF_REF_TOP, multiline=true}
},
},
},
},
Second={ --Right side
class=UI.Panel,
layoutModel=UI.Layout.Vertical,
layout={weightx=1, fill=1},
children={
{ class=UI.Label, Text="Multiline text:" },
{ class=UI.Viewport, layout={weighty=2,fill=1},
Content={
class=UI.TextField,
layout={fill=1},
TextLayout={ flags=FontBase.TLF_TOP|FontBase.TLF_REF_TOP, multiline=true}
},
},
},
},
},
}
})
local screen=UI.Screen.new()
screen:ui(demo)
UI.Style:setDefault(UI.Theme.PointCore_Base)
screen:updateStyle()