Garry's Mod Wiki

DProperty_Combo:DataChanged

  DProperty_Combo:DataChanged( any data )

Description

Called after the user selects a new value.

Arguments

1 any data
The new data that was selected.

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