telmob Posted February 28, 2022 Share Posted February 28, 2022 (edited) I've been noticing for the last days that after a few minutes my GUI is left unattended, the borders disappear in all showing ListViews. I thought it was only when the app was not compiled, but it happens with Koda, and on the script itself, compiled or not. I then need to minimize/restore the window for the listview to show normally again. I'm on Windows 11. Not sure if that's part of the issue. The pics attached are self-explanatory. Any idea how to fix this? Or am i the only one with this problem? I tried searching the forum, but nothing came up. Koda bugged: Script bugged: Normal: Example List from my script: $ListPag = GUICtrlCreateListView("ID|Data|NºColab.|Nome|Pago", 632, 152, 426, 174) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 1) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 120) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 70) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 3, 110) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 4, 70) _GUICtrlListView_JustifyColumn(GUICtrlGetHandle($ListPag), 1, 2) _GUICtrlListView_JustifyColumn(GUICtrlGetHandle($ListPag), 2, 2) _GUICtrlListView_JustifyColumn(GUICtrlGetHandle($ListPag), 4, 2) _GUICtrlListView_HideColumn ( $ListPag, 0) GUICtrlSetBkColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_LV_ALTERNATE) Edit: Just found out that this is an old problem, maybe even an old bug, but i also haven't seen any recent updates. Changed the title to a more appropriate one. Edited February 28, 2022 by telmob Link to comment Share on other sites More sharing options...
telmob Posted February 28, 2022 Author Share Posted February 28, 2022 (edited) Just wanted to add that all my ListViews are inside Tab controls. I just wanted to share this, because i found a similar issue on the forum. Edit: Just found out that this 'bug' happens when Windows is locked for some time. Not sure if it happens in other situations. Anyway, i managed to get past this problem using the script from KaFu: Just edited it to refresh my GUI when the screen is unlocked, with _WinAPI_RedrawWindow($GUI), which requires #include <WinAPIGdi.au3> btw. I will not mark this as solved for now, because i still think it's a bug, but hey, it's working Edited February 28, 2022 by telmob Found a bypass Link to comment Share on other sites More sharing options...
Mandos Posted March 7, 2022 Share Posted March 7, 2022 Hi, I just updated to 3.3.16.0, and found an issue that may be related to this one. The borders of a combo box inside a tab item disappear as soon as the contents is updated using GUICtrlSetData after the tabitem structure has been closed. Here is a short example script: ; combo box inside tab Local $hTestGUI = GUICreate("ComboBoxTest", 300, 100) Local $hTestTab = GUICtrlCreateTab(-1, -1, 260) Local $hTestItem = GUICtrlCreateTabItem("test") Local $hTestCombo = GUICtrlCreateCombo("test1", 20, 25, 120) GUISetState(@SW_SHOWNORMAL, $hTestGUI) GUICtrlSetData($hTestCombo, "test1|test2|test3", "test2") GUICtrlCreateTabItem("") GUICtrlSetData($hTestCombo, "|test1|test2|test3", "test1") MsgBox(0, "Waiting", "Click OK to close window") Exit In AutoIt 3.3.16.0 the combo box border is invisible: However, it appears as soon as the mouse is moved over it. If the script is run in AutoIt 3.3.14.5 or the line GUICtrlSetState($hTestCombo, 16) is added after the second GUICtrlSetData line, the border is restored. This is what I expect it to look like: Link to comment Share on other sites More sharing options...
telmob Posted March 7, 2022 Author Share Posted March 7, 2022 1 hour ago, Mandos said: Hi, I just updated to 3.3.16.0, and found an issue that may be related to this one. The borders of a combo box inside a tab item disappear as soon as the contents is updated using GUICtrlSetData after the tabitem structure has been closed. Here is a short example script: ; combo box inside tab Local $hTestGUI = GUICreate("ComboBoxTest", 300, 100) Local $hTestTab = GUICtrlCreateTab(-1, -1, 260) Local $hTestItem = GUICtrlCreateTabItem("test") Local $hTestCombo = GUICtrlCreateCombo("test1", 20, 25, 120) GUISetState(@SW_SHOWNORMAL, $hTestGUI) GUICtrlSetData($hTestCombo, "test1|test2|test3", "test2") GUICtrlCreateTabItem("") GUICtrlSetData($hTestCombo, "|test1|test2|test3", "test1") MsgBox(0, "Waiting", "Click OK to close window") Exit In AutoIt 3.3.16.0 the combo box border is invisible: However, it appears as soon as the mouse is moved over it. If the script is run in AutoIt 3.3.14.5 or the line GUICtrlSetState($hTestCombo, 16) is added after the second GUICtrlSetData line, the border is restored. This is what I expect it to look like: Thanks @Mandos! It appears to be the case. It seems to be an old issue. Let's hope it solved eventually 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