DProperty Combo/DataChanged

From Garry's Mod
Jump to: navigation, search
 DProperty_Combo:DataChanged( )

Contents

DescriptionPanelFunc

Called after the user selects a new value.

Arguments

any data

The new data that was selected.

Examples

Example

Click on the "Table" choice.

local choice = DP:CreateRow( "Choices", "Combo #2: Custom default text" )
choice:Setup( "Combo", "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

Output:

You selected: table: 0x8e05f3b8
Personal tools
Navigation