Sign in to follow this  
Followers 0
BALA

Making button look "pressed down"

10 posts in this topic

Is there a way to make a button look like it is pressed down (like when you get a soda from a fast food place and there's those indented circles on the lid).


[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites



This any good

#include <GUIConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("AForm1", 633, 447, 193, 115)
$Button1 = GUICtrlCreateButton("AButton1", 48, 40, 161, 113, $BS_FLAT, $WS_EX_CLIENTEDGE)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
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

So, $BS_FLAT? :)

$BS_FLAT is a "button style". I actually use it for everything. Might have the effect you want... might not.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

How about making it so after you click the button you change its style?

How could I do that?

Edited by BALA

[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

Share this post


Link to post
Share on other sites

How about making it so after you click the button you change its style?

How could I do that?

Without testing it the two ideas I would have are:

1.) Have the button information a variable so that after you run the function associated with the button, it would change the variable, thus changing the button style.

or

2.) It removes the original button and adds a new one in its place with a different style.

Probably an easier way somewhere. Perhaps search for "disable button" or something to that affect.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Thanks, I was originally thinking of the second one, but the first one seems much easier now :)

EDIT: If I set it to a variable though, what would be the style I would set the variable to for a normal button?

Edited by BALA

[font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com

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