PageRenderTime 76ms CodeModel.GetById 60ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 15ms

/lib/CGroupBoxControl.ahk

http://github.com/Skiouros/Macro
AutoHotKey | 35 lines | 17 code | 0 blank | 18 comment | 0 complexity | e880741001c872d811fdd33eeb017133 MD5 | raw file
 1/*
 2Class: CGroupBoxControl
 3A GroupBox control. Nothing special.
 4
 5This control extends <CControl>. All basic properties and functions are implemented and documented in this class.
 6*/
 7Class CGroupBoxControl Extends CControl
 8{
 9	__New(Name, Options, Text, GUINum)
10	{
11		base.__New(Name, Options, Text, GUINum)
12		this.Type := "GroupBox"
13		this.Insert("_", {})
14		this._.Insert("Controls", {})
15		;No styles here for now, why would you want them?
16	}
17	/*
18	Function: AddControl
19	Adds a control to this groupbox. The parameters correspond to the Add() function of CGUI, but the coordinates are relative to the GroupBox.
20	
21	Parameters:
22		Type - The type of the control.
23		Name - The name of the control.
24		Options - Options used for creating the control. X and Y coordinates are relative to the GroupBox.
25		Text - The text of the control.
26	*/
27	AddControl(type, Name, Options, Text)
28	{
29		;~ global CGUI
30		GUI := CGUI.GUIList[this.GUINum]
31		Control := GUI.AddControl(type, Name, Options, Text, this._.Controls, this)
32		Control.hParentControl := this.hwnd
33		return Control
34	}
35}