DProperty_Combo
Açıklama
Bu dahili olarak kullanılır - kullanabiliyor olsanız da muhtemelen kullanmamalısınız.
Bir DProperties paneli için DComboBox kontrolü.
Ebeveyn
Bu sayfada listelenmeyen metotları vb. DProperty_Generic'ten miras alır.
Metotlar
Birleşik giriş kutusu kontrolünüze bir seçenek ekler.
DProperty_Combo:DataChanged( any data )
Kullanıcı yeni bir değer seçtikten sonra çağrılır.
DProperty_Combo:SetSelected( number Id )
Seçili seçeneği ayarlar.
Örnek
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
Tüm sunucular · GmodTR Launcher · Rehber · GMod Wiki · GmodTR nedir? · Sunucu ekle · Discord