Garry's Mod Wiki

Slider

Description

We advise against using this. It may be changed or removed in a future update. Only exists for backwards compatibility with Panel:SetActionFunction and Panel:PostMessage. Use DNumSlider instead.

A simple slider featuring an numeric display.

Parent

Derives from Panel.

Example

Creates a slider atop a DFrame which prints its value as it's being dragged.

local frame = vgui.Create( "DFrame" ) frame:SetSize( 280, 70 ) frame:Center() frame:SetTitle( "Bilderberg Group Dollar Value Slider" ) frame:MakePopup() local DermaSlider = vgui.Create("Slider", frame) DermaSlider:SetPos( 0, 30 ) DermaSlider:SetWide( 100 ) DermaSlider:SetMin( 0 ) DermaSlider:SetMax( 1.0 ) DermaSlider:SetValue( 0.5 ) DermaSlider:SetDecimals( 2 ) DermaSlider.OnValueChanged = function( panel, value ) print( tostring( value ) ) end

Page Links


Special Pages


Wikis

?

Render Time: 88ms

DB GetPage 46
Generate Html 10
SaveChanges (1) 18
Render Body 0
Render Sidebar 11