nuki Posted October 7, 2009 Share Posted October 7, 2009 (edited) hi guys! sorry for the easy question, but i have problems with the new search engine or whatever, i cant find a solution... i got a listview control, and some column headers made with _GUICtrlListView_AddColumn() everythings working fine so far and i set the width of the column headers too, but when i add a listview item the column header auto sizes. i need to know a way to be able to size the column headers by hand, but they should not change because of the new item input i thought it might be a style or exstyle but i didnt found anything yet :< (the resizing stuff wouldnt be a problem, but when the columns resize, a horizontal scroll pops out and that looks shit, maybe theres a way to disable the scroll thing too? ^^) i hope you understand me and thanks for any help marvin Edited October 7, 2009 by nuki Link to comment Share on other sites More sharing options...
water Posted October 7, 2009 Share Posted October 7, 2009 (edited) In my scripts I use GUICtrlSendMsg($hGUIUserList, $LVM_SETCOLUMNWIDTH, 0, $LVSCW_AUTOSIZE_USEHEADER) to set the column width to autosize (I got this code from this forum). Replace $LVSCW_AUTOSIZE_USEHEADER with the columnwidth in pixel. Edited October 7, 2009 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
nuki Posted October 7, 2009 Author Share Posted October 7, 2009 hey thanks for the answer but its the same like _GUICtrlListView_SetColumnWidth or the _SendMessage command for that, i tried these all already and yours too nothing works, only if i use the command AFTER i set the items... but it looks crappy if you add an item, because it goes autosized and then small again i need something to keep the column headers static, something like a style Link to comment Share on other sites More sharing options...
water Posted October 7, 2009 Share Posted October 7, 2009 (edited) Use _GUICtrlListView_BeginUpdate and _GUICtrlListView_EndUpdate to improve performance and to suppress displaying the ListView while the script is filling it. _GUICtrlListView_BeginUpdate($hGUIUserList) < ... Fill the ListView ... > _GUICtrlListView_SetColumnWidth($hGUIUserList,0,150) _GUICtrlListView_SetColumnWidth($hGUIUserList,1,250) _GUICtrlListView_EndUpdate($hGUIUserList) Edited October 7, 2009 by water My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki 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