/lib/CGroupBoxControl.ahk

http://github.com/Skiouros/Macro · AutoHotKey · 35 lines · 17 code · 0 blank · 18 comment · 0 complexity · e880741001c872d811fdd33eeb017133 MD5 · raw file

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