Sign in to follow this  
Followers 0
charvi

GUICtrlCreateInput() on a Graphical Surface Problem

3 posts in this topic

Hi there,

I have discovered that it's impossible to click on some input fields when they are put on a graphical surface. Probably a bug? Please confirm so I can report it as a bug.

If the line with $h_Graph is removed it works well.

With the $h_Graph the inputs works well but you cannot have the I beam to click on it......

Cheers, Charvi

$h_Win = GUICreate("BUG WITH INPUT ON A GRAPHICAL SURFACE", 640, 450)
$h_Graph = GUICtrlCreateGraphic(0, 0)

    Local $r1 = GUICtrlCreateInput("",10,10,100,24)
    Local $r2 = GUICtrlCreateInput("",10,40,100,24)
    Local $r3 = GUICtrlCreateInput("",10,70,200,24)
    Local $r4 = GUICtrlCreateInput("",10,100,160,24)
    Local $r5 = GUICtrlCreateInput("",10,130,60,24)
    Local $r6 = GUICtrlCreateInput("",80,130,40,24)
    Local $r7 = GUICtrlCreateInput("",130,130,150,24)
    Local $r8 = GUICtrlCreateInput("",10,160,400,24)
    Local $r9 = GUICtrlCreateInput("",10,190,400,24)
    
    GUISetState()

    While 1
        $i_Msg = GUIGetMsg()
        Select
            Case $i_Msg = -3; $GUI_EVENT_CLOSE
                ExitLoop
        ;EndCase
        EndSelect
    WEnd

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

may be

#include <GUIConstantsEx.au3> ;added
#include <WindowsConstants.au3> ;added
$h_Win = GUICreate("BUG WITH INPUT ON A GRAPHICAL SURFACE", 640, 450)
$h_Graph = GUICtrlCreateGraphic(0, 0)
GUICtrlSetState($h_Graph , $GUI_DISABLE) ;added
    Local $r1 = GUICtrlCreateInput("",10,10,100,24)
    Local $r2 = GUICtrlCreateInput("",10,40,100,24)
    Local $r3 = GUICtrlCreateInput("",10,70,200,24)
    Local $r4 = GUICtrlCreateInput("",10,100,160,24)
    Local $r5 = GUICtrlCreateInput("",10,130,60,24)
    Local $r6 = GUICtrlCreateInput("",80,130,40,24)
    Local $r7 = GUICtrlCreateInput("",130,130,150,24)
    Local $r8 = GUICtrlCreateInput("",10,160,400,24)
    Local $r9 = GUICtrlCreateInput("",10,190,400,24)
    
    GUISetState()

    While 1
        $i_Msg = GUIGetMsg()
        Select
            Case $i_Msg = -3; $GUI_EVENT_CLOSE
                ExitLoop
        ;EndCase
        EndSelect
    WEnd
Edited by LithiumLi

Share this post


Link to post
Share on other sites

GUICtrlSetState($h_Graph , $GUI_DISABLE) ;added

Indeed the $GUI_DISABLE solves the problem. So, there's no bug. (Luckily ;-))

Thank you for your help LithiumLi!

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