Sign in to follow this  
Followers 0
automationexpert12345

Problem w/ GUICtrlCreateList & GUICtrlCreateTab

4 posts in this topic

Hi everyone,

I've had tremendous success using AutoIt and have recently stumbled on to a bit of an inconvenience and wanted to see if anyone was having similar trouble. I've browsed the forums and notices some problems with the painting of certain controls whenever they have been placed over a tabitem, but I haven't seen any talk of listboxes. Run the code below to see the discoloration (dark grey) of the listbox over the tabitem. I added a second listbox created the same way outside of a tabitem to demonstrate the glitch. Any thoughts?

FYI: I am using v3.1.1.128 (beta) with the following code snippet :

#include <GuiConstants.au3>

; GENERATE GUI INTERFACE
$MainGUI = GuiCreate("Tools", 600, 700)
$Tab1 = GUICtrlCreateTab(5,5,590,390)
GUICtrlCreateTabItem ( "Tab1" )

$ListWindow_painting_problem = GUICtrlCreateList("",18,35,555,90)  
$Tab1 = GUICtrlCreateTabitem ("")

$ListWindow2_fine = GUICtrlCreateList("",18,435,555,90)  
$Tab2 = GUICtrlCreateTabItem ( "Tab2" )
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()

    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd

Exit

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

That is kind of annoying isn't it lol... For now, I would just do this ($GUI_BKCOLOR_TRANSPARENT):

#include <GuiConstants.au3>

; GENERATE GUI INTERFACE
$MainGUI = GuiCreate("Tools", 600, 700)
$Tab1 = GUICtrlCreateTab(5,5,590,390)
GUICtrlCreateTabItem ( "Tab1" )

$ListWindow_painting_problem = GUICtrlCreateList("",18,35,555,90)
GUICtrlSetBkColor(-1, -2); $GUI_BKCOLOR_TRANSPARENT = -2
$Tab1 = GUICtrlCreateTabitem ("")

$ListWindow2_fine = GUICtrlCreateList("",18,435,555,90) 
$Tab2 = GUICtrlCreateTabItem ( "Tab2" )
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()

    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Nice work around - thanks!

Quick question though - what does the -1 reference (where the controlID would be used)?

Any idea if this is something that can be added to the "fixable" items for the next beta release? =)

That is kind of annoying isn't it lol... For now, I would just do this ($GUI_BKCOLOR_TRANSPARENT):

#include <GuiConstants.au3>

; GENERATE GUI INTERFACE
$MainGUI = GuiCreate("Tools", 600, 700)
$Tab1 = GUICtrlCreateTab(5,5,590,390)
GUICtrlCreateTabItem ( "Tab1" )

$ListWindow_painting_problem = GUICtrlCreateList("",18,35,555,90)
GUICtrlSetBkColor(-1, -2); $GUI_BKCOLOR_TRANSPARENT = -2
$Tab1 = GUICtrlCreateTabitem ("")

$ListWindow2_fine = GUICtrlCreateList("",18,435,555,90) 
$Tab2 = GUICtrlCreateTabItem ( "Tab2" )
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()

    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd

Share this post


Link to post
Share on other sites

-1 stands for the last control created.


Don't take my pic to serious...~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~You Looked, but you did not see!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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