s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
live now
Game Jam III
Ends
Fri 25 Sep
Theme
One More Round
The jam is running. Build something, or play the entries.
£
50,000
prizepool
View the jam
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
input
Log in with Steam
chevron_left
Change Language
简体中文
English
Русский
Español
Português-Brasil
Deutsch
日本語
Français
Polski
Türkçe
한국어
Pirate
Italiano
ไทย
繁體中文
Українська
Čeština
Nederlands
Magyar
Dansk
Suomi
Svenska
Norsk
Ελληνικά
Română
Български
Tiếng Việt
Bahasa Indonesia
Español-Latinoamérica
العربية
Api
Classes
SplitContainer
chevron_left
Classes
class
SplitContainer
Constructors
functions
SplitContainer
Fields
crop_din
MinimumFractionLeft
crop_din
MinimumFractionRight
Properties
data_object
FractionCookie
data_object
IsDragging
data_object
Left
data_object
Right
data_object
Splitter
data_object
Vertical
Methods
lock
OnMouseMove
functions
OnTemplateSlot
functions
SetProperty
functions
UpdateSplitFraction
SplitContainer
A control that has two panes with a splitter in between. You can drag the splitter to change the size of the two panels.
class
Sandbox.UI
.
account_tree
extends
Panel
Sandbox.Engine
build
Constructors
1
SplitContainer
(
)
crop_din
Fields
2
MinimumFractionLeft
float
The smallest the left section can be as a fraction (0-1). Also controls the largest the right section can be.
MinimumFractionRight
float
The smallest the right section can be as a fraction (0-1). Also controls the largest the left section can be.
data_object
Properties
6
FractionCookie
string
We can save the position of this splitter in a cookie. To do that set this (or "cookie" in a template). We'll automatically save and restore from the cookie.
IsDragging
bool
Returns true if splitter is being dragged
Left
Panel
The left, or top panel. Has class "split-left".
Right
Panel
The left, or bottom panel. Has class "split-right".
Splitter
Panel
The splitter control
Vertical
bool
Should this be laid out vertically? If you set this to vertical you should mentally change Left to Top and Right to Bottom.
functions
Methods
4
OnMouseMove
(
e
)
If we're dragging then position the split where the mouse is.
OnTemplateSlot
(
element
,
slotName
,
panel
)
You can create child panels in the template by setting attributes on them, like slot="left" to make that panel appear in the left panel.
SetProperty
(
name
,
value
)
UpdateSplitFraction
(
f
)
Sets the split fraction to this value. Will automatically adjust the value according to MinimumFraction parameters, and will save the new value to cookie.
Inheritance
Panel
SplitContainer
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.