Sign in to follow this  
Followers 0
fearii

Tooltip for disabled control

7 posts in this topic

#1 ·  Posted (edited)

Kinda lost here, any suggestions?

Need to get my guictrlsettip working on controls that are disabled with guictrlsetstate($var, $GUI_DISABLE)

is there a way to get it to work, or a way to lockup an control without disabling it?

Edited by fearii

Share this post


Link to post
Share on other sites



I don't think you get the tooltip to come up on a disabled control.

If your script handles the response to the control, just add some logic to ignore, for instance, clicks on that button while it's supposed to be "inactive".

:(


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

yea thought of making the "locked" controls ignore clicks but wanted to find out if there was a simplyer way for it.

Share this post


Link to post
Share on other sites

Here's how I did it in EMP:

GUICtrlCreateLabel("", 3, 37, 90, 20)
GUICtrlSetTip(-1, "Just because I am disabled doesn't mean I am a easter-egg, now move that dirty mouse away from me!!")
$Spectrascope = GUICtrlCreateButton("Next visualization", 3, 37, 90, 20)
GUICtrlSetState(-1, $GUI_DISABLE)

Notice the positions and it's obvious what I did.

Share this post


Link to post
Share on other sites

yea ofcourse writing something over it works, just not really a sensible thing to do with a gui containing over 200 visible controls.

Causes the gui to blink annoyingly, thanks for all the help tho :(

Eventually set a style on the controls that is not really supported and causes the controls to stop working without being disabled and the tooltip works aswell ofcourse.

To get em back working set styles on them again ovbiously.

Here's how I did it in EMP:

GUICtrlCreateLabel("", 3, 37, 90, 20)
GUICtrlSetTip(-1, "Just because I am disabled doesn't mean I am a easter-egg, now move that dirty mouse away from me!!")
$Spectrascope = GUICtrlCreateButton("Next visualization", 3, 37, 90, 20)
GUICtrlSetState(-1, $GUI_DISABLE)

Notice the positions and it's obvious what I did.

Share this post


Link to post
Share on other sites

I don't know what you're talking about, it doesn't flicker in any note-worthy way, and a good coder wouldn't need any more code for 1080 controls than 4.

#include <GUIConstantsEx.au3>

GUICreate("test", 1600, 1200)

For $X = 0 To 1600 Step 90
    For $Y = 0 To 1200 Step 20
        GUICtrlCreateLabel("", $X, $Y, 90, 20)
        GUICtrlSetTip(-1, $X)
        $Spectrascope = GUICtrlCreateButton($Y, $X, $Y, 90, 20)
        GUICtrlSetState(-1, $GUI_DISABLE)
    Next
Next

GUISetState()

Do
    Sleep(10)
Until GUIGetMsg() = -3

But if you really found yourself another solution, then please share it, so when people in the future with the same issue find this thread they will have all alternatives! :(

Share this post


Link to post
Share on other sites

could of been something else in the code making it flicker, no idea. Most likely just me & my writings.

its not that i couldnt do the controls with 4 lines, but since allmost all of em are different size and not equally far from eachothers dont think ill be going for a loop to create em

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