Simpel Posted April 11, 2018 Share Posted April 11, 2018 Hi, when I place a label as a color surface above a listview, a button or an input the label partly disappears. Example: #include <GUIConstantsEx.au3> Example() Func Example() GUICreate("Label Test", 220, 300, 100, 200) GUISetBkColor(0x00E0FFFF) Local $idListview = GUICtrlCreateListView("col1 |col2|col3 ", 10, 10, 200, 150) GUICtrlCreateListViewItem("item1|col12|col13", $idListview) GUICtrlCreateListViewItem("item2|col22|col23", $idListview) GUICtrlCreateButton("Value?", 20, 170, 180, 25) GUICtrlCreateInput("", 20, 205, 180, 25) GUICtrlCreateLabel("This is a testThis is a testThis is a testThis is a test", 20, 240, 180, 30) GUICtrlSetBkColor(-1, 0x00FF00) GUISetState(@SW_SHOW) GUICtrlCreateLabel("", 5, 5, 105, 290) ; that should be the topmost item in the gui GUICtrlSetBkColor(-1, 0xFF0000) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd EndFunc ;==>Example The red label should cover half of the gui. But right a start the listview is excluded: And after hovering over button and input even there the red label vanishes: The green label always stays behind the red one. What is the reason for this behavior and how to change this? Regards, Conrad SciTE4AutoIt = 3.7.3.0 AutoIt = 3.3.14.2 AutoItX64 = 0 OS = Win_10 Build = 19044 OSArch = X64 Language = 0407/german H:\...\AutoIt3\SciTE H:\...\AutoIt3 H:\...\AutoIt3\Include (H:\ = Network Drive) Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. Link to comment Share on other sites More sharing options...
funkey Posted April 12, 2018 Share Posted April 12, 2018 I don't know what is the purpose of this, but here is a solution ( if I understood you correct). expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPI.au3> Example() Func Example() Local $hMain = GUICreate("Label Test", 220, 300, 100, 200) Local $hChild1 = GUICreate("SubWindow1", 105, 290, 5, 5, $WS_CHILD, $WS_EX_TOPMOST, $hMain) GUISetBkColor(0xFF0000) GUISetState(@SW_SHOW) Local $hChild2 = GUICreate("SubWindow2", 220, 300, 0, 0, $WS_CHILD, -1, $hMain) GUISetBkColor(0x00E0FFFF) Local $idListview = GUICtrlCreateListView("col1 |col2|col3 ", 10, 10, 200, 150) GUICtrlCreateListViewItem("item1|col12|col13", $idListview) GUICtrlCreateListViewItem("item2|col22|col23", $idListview) GUICtrlCreateButton("Value?", 20, 170, 180, 25) GUICtrlCreateInput("", 20, 205, 180, 25) GUICtrlCreateLabel("This is a testThis is a testThis is a testThis is a test", 20, 240, 180, 30) GUICtrlSetBkColor(-1, 0x00FF00) GUISetState(@SW_SHOW) GUISwitch($hMain) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd EndFunc ;==>Example Programming today is a race between software engineers striving tobuild bigger and better idiot-proof programs, and the Universetrying to produce bigger and better idiots.So far, the Universe is winning. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now