Sign in to follow this  
Followers 0
Scanzee

GUIButtons prob.

4 posts in this topic

I'm scripting a program for children so the text in the buttons must be bigger then normal..

How can I make the text in the buttons bigger?!

Thanks Scanzee <Scanzee@hotmail.com>

Share this post


Link to post
Share on other sites



I'm scripting a program for children so the text in the buttons must be bigger then normal..

How can I make the text in the buttons bigger?!

Thanks Scanzee <Scanzee@hotmail.com>

Use GuiSetFont see example below

#include <GUIConstants.au3>

GUICreate("My GUI Button") ; will create a dialog box that when displayed is centered

$font="Comic Sans MS"

Opt("GUICoordMode",2)
GUISetFont (20, 400, 2, $font)
GUICtrlCreateButton ("OK",  50, 100, 100)
GUICtrlCreateButton ( "Cancel",  0, -1)

GUISetState ()    ; will display an  dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    
    If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

Since its for kids....

I added sound-over-buttons ( from a gafrost script )

#include <GUIConstants.au3>

Dim $o_speech = ObjCreate ("SAPI.SpVoice"), $TVc

GUICreate("My GUI Button"); will create a dialog box that when displayed is centered

$font="Comic Sans MS"

Opt("GUICoordMode",2)
GUISetFont (20, 400, 2, $font)
$Btn1 = GUICtrlCreateButton ("OK", 50, 100, 100)
$Btn2 = GUICtrlCreateButton ( "Cancel", 0, -1)

GUISetState (); will display an dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()

    $TVc = $TVc + 1
    If $TVc >= 50 Then $TVc = 0
    If $TVc = 1 Then
        $a = GUIGetCursorInfo()
        If $a[4] = $Btn1 Then $o_speech.Speak ("Ok", 8)
        If $a[4] = $Btn2 Then $o_speech.Speak ("Cancel", 8)
    EndIf

If $msg = $GUI_EVENT_CLOSE Then ExitLoop
Wend

hope that helps too!

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0