Skip to content
/ CGUI Public
forked from lipkau/CGUI

An object-oriented GUI library for AutoHotkey

Notifications You must be signed in to change notification settings

sancarn/CGUI

 
 

Repository files navigation

CGUI

Contributors

Description

This is an object-oriented GUI library for autohotkey (AHK).

The library comes fresh with a suite of controls for use within your own GUIs:

  • CTextControl
  • CEditControl
  • CButtonControl
  • CCheckboxControl
  • CChoiceControl
  • CListViewControl
  • CLinkControl
  • CGroupBoxControl
  • CStatusBarControl
  • CTreeViewControl
  • CTabControl
  • CProgressControl
  • CSliderControl
  • CHotkeyControl
  • CActiveXControl
  • CPictureControl

Basic example

Source

#SingleInstance,Force
#include ..\CGUI.ahk

;Create GUI with title "Cool GUI"
new MyGui("Cool GUI")
return

;Extend CGUI to build a new GUI
Class MyGui Extends CGUI {
  ;Controls can be defined as class variables at the top of the class like this:
  ;Note: 2nd parameter is used in method callbacks. Alternatively callbacks can be assigned directly. (To do example)
  btnButton := this.AddControl("Button", "myButton", "", "button")
  
  __New(Title){
    ;Set title
    this.Title := Title

    ;Some options we probably want
    this.CloseOnEscape := true
    this.DestroyOnClose := true
    
    ;Show the window
    this.Show("w250 h100")
  }
  
  ;On click of myButton
  myButton_click(){
      msgbox Hello world!
  }
}

Result

Basic GUI

Other Examples

Detailed examples can be found in the samples directory.

About

An object-oriented GUI library for AutoHotkey

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • AutoHotkey 100.0%