Jump to content

Recommended Posts

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
Posted

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
Posted

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.

Posted

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.

Posted

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! :(

Posted

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

  • 11 years later...
Posted

#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <GUIConstantsEx.au3>

GUICreate("test", 800, 400)

For $X = 0 To 300 Step 90
    For $Y = 0 To 300 Step 20

        $Spectrascope = GUICtrlCreateCheckbox('test me', $X, $Y, 90, 20)
        If Mod($X, 20) = 0  Then GUICtrlSetState(-1, $GUI_DISABLE)
         GUICtrlSetTip(-1, $X)
        GUICtrlCreatePic("", $X, $Y, 90, 20, BitOR($SS_NOTIFY, $WS_CLIPSIBLINGS))
        GUICtrlSetTip(-1, $X)
    Next
Next

GUISetState()

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...