DCheckBoxLabel:OnChange
Örnek
İşaretlendiğinde/işareti kaldırıldığında konsola çıktı yazdıran bir DCheckBoxLabel oluşturur.
local Frame = vgui.Create( "DFrame" )
Frame:SetSize( 300, 100 )
Frame:SetPos( 200, 200 )
local LabelBox = vgui.Create( "DCheckBoxLabel", Frame )
LabelBox:SetPos( 10, 40 )
LabelBox:SetText( "This is a DLabel" )
function LabelBox:OnChange( val )
if val then
print( "The box has been ticked!" )
else
print( "The box has been unticked!" )
end
end
Çıktı: Kutu işaretlendi!
Tüm sunucular · GmodTR Launcher · Rehber · GMod Wiki · GmodTR nedir? · Sunucu ekle · Discord