Jump to content

ctrl over an other


cramaboule
 Share

Recommended Posts

Hello,

Here is a good one :

I have to say first that my purpose is to have "flat" Input box or "flat" Edit box, that CAN be selected but not changed (that's why I use the $ES_READONLY). I found (by mistake !!!!) the 0x00100000 to make it flat!

So to add some black surrounding I put a black background colour to the GUI, BUT (there is always a BUT !!!) I like to have some grey (looks nicer !) (made with the GUICtrlCreateLabel) on the bottom to put 1 button (Actually, in my bigger script I'll put 2 !)

-> The Problem: well,... I cannot click on the button if there is the GUICtrlCreateLabel

-> Question 1: How can I fix this ?(Either to add a black surrounding to the Edit ctrl or to fix the clicking problem or .....)

-> Question 2: Do you think it's a bug ?

Here is a picture:

Posted Image

I spent some times to look on the problem can't figured out !

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <EditConstants.au3>
#include <ButtonConstants.au3>


Example1()



Func Example1()
    Local $msg ,$i , $j= 15 , $Esp=1 , $max = 7

    GUICreate("My GUI",92, ($j* ($max - 1))+21) 
    GUISetBkColor(0x000000)
    
    GUICtrlCreateLabel("", 0 , ($j*($max-1))+$Esp , ($j*($max-1))+21 , 200)
    GUICtrlSetBkColor(-1, 0xD4D0C8) 
    
    For $i = 1 to $max -1
        GUICtrlCreateInput ($i, 1,($j* ($i - 1))+$Esp , 90, $j-$Esp, $ES_READONLY, 0x00100000)
        GUICtrlSetBkColor(-1, 0xffff00) ; yellow
    Next
    $lp=GUICtrlCreateButton("lp", 20,($j* ($i - 1))+$Esp,20,20,-1,$WS_EX_TOPMOST )

    GUISetState(@SW_SHOW) 


    While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $lp
            MsgBox(0,"test","test")
    EndSelect
    WEnd
    GUIDelete()
EndFunc   ;==>Example1

Cramaboule.

Edit: Forgot to put the code !!!

Edited by cramaboule
Link to comment
Share on other sites

  • Moderators

cramaboule,

Not a good one, but (yawn) a very old and often asked one!

Disable the label using $GUI_DISABLE.

AutoIt does not accept overlapping active controls. I assume that when it gets the mouse coordinates from a click it cannot decide upon which control to activate.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

cramaboule,

Not a good one, but (yawn) a very old and often asked one!

Disable the label using $GUI_DISABLE.

AutoIt does not accept overlapping active controls. I assume that when it gets the mouse coordinates from a click it cannot decide upon which control to activate.

M23

Thanks, It works !!!

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...