Category:DProperty Combo

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
 
Line 1: Line 1:
 
{{Panel
 
{{Panel
|Description={{Internal}}Combo control for a {{Type|DProperties}} panel.
 
 
|Parent=DProperty_Generic
 
|Parent=DProperty_Generic
 
|Preview=DProperty_Combo_preview.png
 
|Preview=DProperty_Combo_preview.png
 +
|Description={{Internal}} {{Type|DComboBox}} control for a {{Type|DProperties}} panel.
 +
|Hooks=
 
}}
 
}}
 
{{Example
 
{{Example
|Code=
+
|Code=local Panel = vgui.Create( "DFrame" )
local Panel = vgui.Create( "DFrame" )
+
 
Panel:SetSize( 500, 500 )
 
Panel:SetSize( 500, 500 )
 
Panel:MakePopup()
 
Panel:MakePopup()

Latest revision as of 16:09, 8 October 2019

Contents

DescriptionPanelPage

This is an internal function or feature.
This means you will be able to use it, but you really shouldn't.
DComboBox control for a DProperties panel.

Inherited Functions

Inherits the following functions from DProperty_Generic and its parents up to 3 levels deep:


Examples

Example

local Panel = vgui.Create( "DFrame" )
Panel:SetSize( 500, 500 )
Panel:MakePopup()

local DP = vgui.Create( "DProperties", Panel )
DP:Dock( FILL )

local choice = DP:CreateRow( "Choices", "Combo #1: Default" )
choice:Setup( "Combo", {} )
choice:AddChoice( "Allow", true )
choice:AddChoice( "Disallow", false )

local choice = DP:CreateRow( "Choices", "Combo #2: Custom default text" )
choice:Setup( "Combo", { text = "Select type..." } )
choice:AddChoice( "Table", {} )
choice:AddChoice( "Function", function() end )
choice:AddChoice( "String", "Hello world" )
choice.DataChanged = function( self, data )
    print( "You selected: ", data )
end


Pages in category "DProperty Combo"

The following 4 pages are in this category, out of 4 total.

Personal tools
Navigation