Jump to content

Here's why


Recommended Posts

Might try labels for the keys behind, it's brutal but might work

Example:

#include <GUIConstants.au3>

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


$Label_1 = GUICtrlCreateLabel("Label1", 180, 100, 40, 170, $SS_SUNKEN + $SS_CENTER, $WS_EX_TRANSPARENT )

$Label_2 = GUICtrlCreateLabel("Label2", 250, 100, 40, 170, $SS_SUNKEN + $SS_CENTER, $WS_EX_TRANSPARENT )

$Button_1 = GUICtrlCreateButton("Button1", 130, 150, 170, 40, $BS_BOTTOM + $BS_CENTER, $WS_EX_TOPMOST)


GUISetState()
_MouseOver($Button_1)

; Run the GUI until the dialog is closed
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $Button_1
            ConsoleWrite("Selected Button 1" & @LF)
        Case $msg = $Label_1
            ConsoleWrite("Selected Label 1" & @LF)
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd

Func _MouseOver($h_controlID)
    Dim $opt = Opt("MouseCoordMode",2)
    Dim $pos = ControlGetPos ( "My GUI color text", "", $h_controlID )
    MouseMove($pos[0] + 5, $pos[1] + 5,0)
    Opt("MouseCoordMode",$opt)
EndFunc
Edited by gafrost

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

great effort gafrost....i mean really an effort and i appreciate it

but... wow, there are lots of keys to work with - play sounds do actions and ... you know..... and like you said

"it's brutal but might work"

i would think somebody has made a keyboard before??????

maybe we need to develop a function or ???? in 3.1.1+++

thanks again for trying so hard

8)

NEWHeader1.png

Link to comment
Share on other sites

No problem, just put the top buttons before the behind buttons, played with it some more, had bleed through of the labels.

$Button_1 = GUICtrlCreateButton("Button1", 130, 150, 170, 40, $BS_BOTTOM + $BS_CENTER)

$Label_1 = GUICtrlCreateLabel("Label1", 180, 100, 40, 170, $SS_SUNKEN + $SS_CENTER )

$Label_2 = GUICtrlCreateLabel("Label2", 250, 100, 40, 170, $SS_SUNKEN + $SS_CENTER )

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

i tried the easy way out with this

GUICtrlSetState($button_1,$GUI_SHOW)

GUICtrlSetState($button_2,$GUI_SHOW)

GUICtrlSetState($button_3,$GUI_SHOW)

GUICtrlSetState($button_4,$GUI_SHOW)

GUICtrlSetState($button_5,$GUI_SHOW)

GUICtrlSetState($button_6,$GUI_SHOW)

GUICtrlSetState($button_7,$GUI_SHOW)

GUICtrlSetState($button_8,$GUI_SHOW)

GUICtrlSetState($button_9,$GUI_SHOW)

GUICtrlSetState($button_10,$GUI_SHOW)

because there are 10 upper/black keys...i put this is the loop...

*****ugly*****

didnt work

NEWHeader1.png

Link to comment
Share on other sites

bumping my head against the wall...........help

<{POST_SNAPBACK}>

When you have overlapping buttons this will always occur

2 solutions:

1) split up your bottons, so your white buttons become in fact 2 buttons

I you get my point:

All buttons same heigth as the black ones, and fit a row of whites unther them

then you wil have no overlapping buttons, but it will show as a dirty line

2) A simple image and one event on mouse down, on the possition of the mouse you determen wich "button" is clicked ("this is mucho trial and error")

can be done with an array

$BottonArray[$numberoff_buttons - 1][5] representing:

$BottonArray[0][0] = note_to_play

$BottonArray[0][1] = Xpoint

$BottonArray[0][2] = Ypoint

$BottonArray[0][3] = Width

$BottonArray[0][4] = Heigth

As the black buttons are smaler then the white ones you have to look for the smalest aerea that does comply to your x and y params from the mouse (or split the button's aerea again the same as in the first solution, 2 aerea's for the white buttons)

It can be done :(

Hope i explained it a bit so you can understand it (i'm crappy at explaining things)

Link to comment
Share on other sites

thank you tumbleweed...

i tried the first idea before.. and tried to cover the "dirty lines" with labels... but, didn't work

i am working on expanding the label idea from gafrost right now...

but.... should i need to , i will try the Array idea.... i made need help on this later because i am not effecient with arrays as yet

thanks again... 8)

NEWHeader1.png

Link to comment
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
 Share

  • Recently Browsing   0 members

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