Decker87 Posted July 25, 2008 Posted July 25, 2008 Is there a way to place a big checkbox in my GUI? With bigger font and a bigger actual checkbox?
Decker87 Posted July 25, 2008 Author Posted July 25, 2008 So, with 29 views and zero replies, I guess I will assume AutoIT can't do this (rather simple) task.
James Posted July 25, 2008 Posted July 25, 2008 So, with 29 views and zero replies, I guess I will assume AutoIT can't do this (rather simple) task.Set the height and width of a control in the control parameters and use GUICtrlSetFont() to edit the font and size. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
Valuater Posted July 25, 2008 Posted July 25, 2008 (edited) ... you seemed to be limited by your imagination... Autoit isn't! expandcollapse popup#include <GUIConstantsEx.au3> #include <ButtonConstants.au3> Opt('MustDeclareVars', 1) Global $checked _Main() Func _Main() Local $button1, $button2, $button3, $button4 Local $button5, $buttonclose GUICreate("test", 240, 180) $buttonclose = GUICtrlCreateButton("close", 200, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 28) GUICtrlCreateLabel("Please Press to EXIT", 10, 10, 180, 40) GUICtrlSetFont( -1, 12, 700) $button1 = GUICtrlCreateButton("1", 200, 90, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 35) GUICtrlCreateLabel("Please Press Checkbox", 10, 100, 190, 40) GUICtrlSetFont( -1, 12, 700) GUISetState() ; Run the GUI until the dialog is closed While 1 Switch GUIGetMsg() Case $buttonclose, $GUI_EVENT_CLOSE ExitLoop Case $button1 If $checked Then GUICtrlSetImage( $button1, "shell32.dll", 35) $checked = 0 Else GUICtrlSetImage( $button1, "shell32.dll", 22) $checked = 1 EndIf Case Else EndSwitch WEnd GUIDelete() EndFunc ;==>_Main 8) Edited July 25, 2008 by Valuater
Decker87 Posted July 27, 2008 Author Posted July 27, 2008 I'm not sure what you mean about my imagination. I'm just looking for help with AutoIT. I have been able to set the font and that tip was quite helpful, but what I'm really looking for is a way to make the standard checkboxes, radio buttons etc. bigger. As in, the actual square checkbox that the user would actually click.
ProgAndy Posted July 28, 2008 Posted July 28, 2008 You could do it this way expandcollapse popup#include <GUIConstantsEx.au3> #include <ButtonConstants.au3> Opt('MustDeclareVars', 1) Global $checked _Main() Func _Main() Local $CheckBox, $CheckBox_LBL Local $button5, $buttonclose GUICreate("test", 240, 180) $buttonclose = GUICtrlCreateButton("close", 200, 0, 40, 40, $BS_ICON) GUICtrlSetImage(-1, "shell32.dll", 28) GUICtrlCreateLabel("Please Press to EXIT", 10, 10, 180, 40) GUICtrlSetFont( -1, 12, 700) $CheckBox = GUICtrlCreateCheckbox("1", 200, 90, 40, 40, $BS_ICON+$BS_PUSHLIKE) GUICtrlSetImage(-1, "shell32.dll", -35) $CheckBox_LBL = GUICtrlCreateLabel("Please Press Checkbox", 10, 100, 190, 40) GUICtrlSetFont( -1, 12, 700) GUISetState() ; Run the GUI until the dialog is closed While 1 Switch GUIGetMsg() Case $buttonclose, $GUI_EVENT_CLOSE ExitLoop Case $CheckBox_LBL ; Register lbl Click :) ControlClick(GUICtrlGetHandle($CheckBox),"","") Case $CheckBox If BitAND(GUICtrlRead($CheckBox),$GUI_CHECKED) = $GUI_CHECKED Then GUICtrlSetImage( $CheckBox, "shell32.dll", -49) Else GUICtrlSetImage( $CheckBox, "shell32.dll", -35) EndIf Case Else EndSwitch WEnd GUIDelete() EndFunc ;==>_Main *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now