DFrame.SetDeleteOnClose

From GMod Wiki

Jump to: navigation, search
Function
Syntax DFrame:SetDeleteOnClose( Boolean delete )
Description:
Sets if the frame is deleted when it's closed.
Returns: nil
In Object: DFrame
Realm: NewerClient.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=DFrame.SetDeleteOnClose]DFrame.SetDeleteOnClose [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionCreate a frame. Set the delete on close state to false.
Used onNewerClient.png
Code
 
myFrame = vgui.Create("DFrame")
myFrame:SetTall(480)
myFrame:SetWide(640)
myFrame:SetDeleteOnClose(false)
myFrame:Center()
myFrame:MakePopup()
// Now when the frame is closed, it won't automatically be Removed.
 
OutputCreates a frame. When the frame is closed, it's visibility is set to false, but the frame is not removed.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox