Sign in to follow this  
Followers 0
ame1011

Listview hiding

7 posts in this topic

Hi, I have a BG image that I disabled so that it stays in the backgroud. However, I notice that when I change the column sizes manually on my listview (by dragging the partition) the listview seems to go behind the image.

Before:

post-6174-1196806839_thumb.jpg

After:

post-6174-1196806846_thumb.jpg


[font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]

Share this post


Link to post
Share on other sites



GUICtrlSetState($bgImage, $GUI_DISABLE)

Share this post


Link to post
Share on other sites

GUI Code:

;main program
$QuickBackupForm = GUICreate("Computer Elite - Quick Backup", 645, 420, 193, 115)
$bg = GUICtrlCreatePic("bg_backup.jpg", 0, 0, 645, 420)
GUICtrlSetState ( $bg, $GUI_DISABLE )

;------IMPORT GROUP--------
;$import_grp = GUICtrlCreateGroup("Open Existing Backup File", 0, 0, 641, 50)
$import_createnew = GUICtrlCreateButton("Create New", 10, 17, 90, 25, 0, $WS_EX_TRANSPARENT )
$import_dropdown = GUICtrlCreateCombo("", 110, 16, 300, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
;populate combo
GUICtrlSetData (-1, _ArrayToString($bat_list, "|", 1))
$import_save = GUICtrlCreateButton("Save", 420, 17, 90, 25, 0, $WS_EX_TRANSPARENT )
$c_default = GUICtrlCreateCheckbox("", 530, 20, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$import_default_label = GUICtrlCreateLabel("Make Default", 550, 22)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

;------ADD GROUP----------
;$backup_grp = GUICtrlCreateGroup("Add Files/Folders", 0, 51, 641, 70)
$source_folders = GUICtrlCreateButton("Select Folder", 430, 65, 100, 25, 0, $WS_EX_TRANSPARENT )
$source_files = GUICtrlCreateButton("Select File(s)", 534, 65, 100, 25, 0, $WS_EX_TRANSPARENT )
$source = GUICtrlCreateInput("", 10, 66, 405, 24)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
;~Checkboxes
$c_mydocuments = GUICtrlCreateCheckbox("", 32, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$c_desktop = GUICtrlCreateCheckbox("", 160, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$c_favorites = GUICtrlCreateCheckbox("", 272, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$c_outlook = GUICtrlCreateCheckbox("", 384, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$c_outlookexpress_windowsmail = GUICtrlCreateCheckbox("", 496, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$l_mydocuments = GUICtrlCreateLabel("My Documents", 56, 100, 75, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$l_desktop = GUICtrlCreateLabel("Desktop", 184, 100, 44, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$l_favorites = GUICtrlCreateLabel("Favorites", 296, 100, 47, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$l_outlook = GUICtrlCreateLabel("Outlook", 408, 100, 41, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
if @OSVersion = "WIN_VISTA" Then
    $l_outlookexpress_windowsmail = GUICtrlCreateLabel("Windows Mail", 520, 100, 81, 17)
Else
    $l_outlookexpress_windowsmail = GUICtrlCreateLabel("Outlook Express", 520, 100, 81, 17)
EndIf
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
;--------DESTINATION GROUP---------
;$dest_grp = GUICtrlCreateGroup("Select Destination", 0,122,641,83)
$backup_submit = GUICtrlCreateButton("Update Backup List", 264, 172, 113, 25, 0, $WS_EX_TRANSPARENT )
$dest_button = GUICtrlCreateButton("Select Folder", 550, 141, 85, 25, 0, $WS_EX_TRANSPARENT )
$destination = GUICtrlCreateInput("", 10, 142, 534, 24)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")

;----------LIST GROUP-----------
;$list_grp = GUICtrlCreateGroup("Currently on Back-Up List", 0, 208, 641, 209)
$list = GUICtrlCreateListView("Source|Destination", 8, 222, 625, 146)
_GUICtrlListViewSetColumnWidth ( $list, 0, 310 )
_GUICtrlListViewSetColumnWidth ( $list, 1, 310 )
$generate_button = GUICtrlCreateButton("Backup Now!", 259, 384, 117, 25, 0, $WS_EX_TRANSPARENT )

BG IMage: post-6174-1196865553_thumb.jpg


[font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]

Share this post


Link to post
Share on other sites

Yes I can confirm some problem (bug?).

I tested it on WINXP with AutoIt 3.2.8.1.

It gets corrupted when horizontal scrollbar occurs.

Maybe this should be posted in Bug reports

Here is full reproducing script (with includes and main GUI loop:

#include <GuiListView.au3>
#include <GUIConstants.au3>

;main program
$QuickBackupForm = GUICreate("Computer Elite - Quick Backup", 645, 420, 193, 115)
$bg = GUICtrlCreatePic("bg_backup.jpg", 0, 0, 645, 420)
GUICtrlSetState ( $bg, $GUI_DISABLE )

;------IMPORT GROUP--------
;$import_grp = GUICtrlCreateGroup("Open Existing Backup File", 0, 0, 641, 50)
$import_createnew = GUICtrlCreateButton("Create New", 10, 17, 90, 25, 0, $WS_EX_TRANSPARENT )
$import_dropdown = GUICtrlCreateCombo("", 110, 16, 300, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
;populate combo
;~ GUICtrlSetData (-1, _ArrayToString($bat_list, "|", 1))
$import_save = GUICtrlCreateButton("Save", 420, 17, 90, 25, 0, $WS_EX_TRANSPARENT )
$c_default = GUICtrlCreateCheckbox("", 530, 20, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$import_default_label = GUICtrlCreateLabel("Make Default", 550, 22)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

;------ADD GROUP----------
;$backup_grp = GUICtrlCreateGroup("Add Files/Folders", 0, 51, 641, 70)
$source_folders = GUICtrlCreateButton("Select Folder", 430, 65, 100, 25, 0, $WS_EX_TRANSPARENT )
$source_files = GUICtrlCreateButton("Select File(s)", 534, 65, 100, 25, 0, $WS_EX_TRANSPARENT )
$source = GUICtrlCreateInput("", 10, 66, 405, 24)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
;~Checkboxes
$c_mydocuments = GUICtrlCreateCheckbox("", 32, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$c_desktop = GUICtrlCreateCheckbox("", 160, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$c_favorites = GUICtrlCreateCheckbox("", 272, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$c_outlook = GUICtrlCreateCheckbox("", 384, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$c_outlookexpress_windowsmail = GUICtrlCreateCheckbox("", 496, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$l_mydocuments = GUICtrlCreateLabel("My Documents", 56, 100, 75, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$l_desktop = GUICtrlCreateLabel("Desktop", 184, 100, 44, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$l_favorites = GUICtrlCreateLabel("Favorites", 296, 100, 47, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$l_outlook = GUICtrlCreateLabel("Outlook", 408, 100, 41, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
if @OSVersion = "WIN_VISTA" Then
    $l_outlookexpress_windowsmail = GUICtrlCreateLabel("Windows Mail", 520, 100, 81, 17)
Else
    $l_outlookexpress_windowsmail = GUICtrlCreateLabel("Outlook Express", 520, 100, 81, 17)
EndIf
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
;--------DESTINATION GROUP---------
;$dest_grp = GUICtrlCreateGroup("Select Destination", 0,122,641,83)
$backup_submit = GUICtrlCreateButton("Update Backup List", 264, 172, 113, 25, 0, $WS_EX_TRANSPARENT )
$dest_button = GUICtrlCreateButton("Select Folder", 550, 141, 85, 25, 0, $WS_EX_TRANSPARENT )
$destination = GUICtrlCreateInput("", 10, 142, 534, 24)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")

;----------LIST GROUP-----------
;$list_grp = GUICtrlCreateGroup("Currently on Back-Up List", 0, 208, 641, 209)
$list = GUICtrlCreateListView("Source|Destination", 8, 222, 625, 146)
_GUICtrlListViewSetColumnWidth ( $list, 0, 310 )
_GUICtrlListViewSetColumnWidth ( $list, 1, 310 )
$generate_button = GUICtrlCreateButton("Backup Now!", 259, 384, 117, 25, 0, $WS_EX_TRANSPARENT )

GUISetState(@SW_SHOW)

While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
WEnd

Share this post


Link to post
Share on other sites

I was just messing around...and found something weird...I placed the $bg = GUICtrlCreatePic("bg_backup.jpg", 0, 0, 645, 420) after Guisetstate() and removed GUICtrlSetState ( -1, $GUI_DISABLE )....and then there are no problems with the listview...

#include <GuiListView.au3>
#include <GUIConstants.au3>

;main program
$QuickBackupForm = GUICreate("Computer Elite - Quick Backup", 645, 420, 193, 115)

;------IMPORT GROUP--------
;$import_grp = GUICtrlCreateGroup("Open Existing Backup File", 0, 0, 641, 50)
$import_createnew = GUICtrlCreateButton("Create New", 10, 17, 90, 25, 0, $WS_EX_TRANSPARENT )
$import_dropdown = GUICtrlCreateCombo("", 110, 16, 300, 25, BitOR($CBS_DROPDOWNLIST,$CBS_AUTOHSCROLL))
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
;populate combo
;~ GUICtrlSetData (-1, _ArrayToString($bat_list, "|", 1))
$import_save = GUICtrlCreateButton("Save", 420, 17, 90, 25, 0, $WS_EX_TRANSPARENT )
$c_default = GUICtrlCreateCheckbox("", 530, 20, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$import_default_label = GUICtrlCreateLabel("Make Default", 550, 22)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)

;------ADD GROUP----------
;$backup_grp = GUICtrlCreateGroup("Add Files/Folders", 0, 51, 641, 70)
$source_folders = GUICtrlCreateButton("Select Folder", 430, 65, 100, 25, 0, $WS_EX_TRANSPARENT )
$source_files = GUICtrlCreateButton("Select File(s)", 534, 65, 100, 25, 0, $WS_EX_TRANSPARENT )
$source = GUICtrlCreateInput("", 10, 66, 405, 24)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")
;~Checkboxes
$c_mydocuments = GUICtrlCreateCheckbox("", 32, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$c_desktop = GUICtrlCreateCheckbox("", 160, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$c_favorites = GUICtrlCreateCheckbox("", 272, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$c_outlook = GUICtrlCreateCheckbox("", 384, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$c_outlookexpress_windowsmail = GUICtrlCreateCheckbox("", 496, 99, 17, 17)
GUICtrlSetBkColor(-1, 0x00000020)
$l_mydocuments = GUICtrlCreateLabel("My Documents", 56, 100, 75, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$l_desktop = GUICtrlCreateLabel("Desktop", 184, 100, 44, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$l_favorites = GUICtrlCreateLabel("Favorites", 296, 100, 47, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
$l_outlook = GUICtrlCreateLabel("Outlook", 408, 100, 41, 17)
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
if @OSVersion = "WIN_VISTA" Then
    $l_outlookexpress_windowsmail = GUICtrlCreateLabel("Windows Mail", 520, 100, 81, 17)
Else
    $l_outlookexpress_windowsmail = GUICtrlCreateLabel("Outlook Express", 520, 100, 81, 17)
EndIf
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT)
;--------DESTINATION GROUP---------
;$dest_grp = GUICtrlCreateGroup("Select Destination", 0,122,641,83)
$backup_submit = GUICtrlCreateButton("Update Backup List", 264, 172, 113, 25, 0, $WS_EX_TRANSPARENT )
$dest_button = GUICtrlCreateButton("Select Folder", 550, 141, 85, 25, 0, $WS_EX_TRANSPARENT )
$destination = GUICtrlCreateInput("", 10, 142, 534, 24)
GUICtrlSetFont(-1, 12, 400, 0, "Times New Roman")

;----------LIST GROUP-----------
;$list_grp = GUICtrlCreateGroup("Currently on Back-Up List", 0, 208, 641, 209)
$list = GUICtrlCreateListView("Source|Destination", 8, 222, 625, 146)
_GUICtrlListViewSetColumnWidth ( $list, 0, 310 )
_GUICtrlListViewSetColumnWidth ( $list, 1, 310 )
$generate_button = GUICtrlCreateButton("Backup Now!", 259, 384, 117, 25, 0, $WS_EX_TRANSPARENT )

GUISetState(@SW_SHOW)

$bg = GUICtrlCreatePic("bg_backup.jpg", 0, 0, 645, 420)
;GUICtrlSetState ( -1, $GUI_DISABLE )

While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
    EndSelect
WEnd

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

that did it! Thanks alot everyone for all your help.

Edit: When the window is minimized and brought back up, all of the controls are hidden behind the background.

Edit2: Fixed. Kept my code the same except added GUICtrlSetState(-1, $GUI_ONTOP) to the listview

Edited by ame1011

[font="Impact"] I always thought dogs laid eggs, and I learned something today. [/font]

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