Hi Oscar,
you should be able to finetune the width using the ListView_SetColumnWidth function.
For more details, open ThinAir, press F1 and into Index tab enter ListView_SetColumnWidth.
Petr
How can i fix the columns width in the ListView control???
please help me...
thanks all.
Oscar
Hi Oscar,
you should be able to finetune the width using the ListView_SetColumnWidth function.
For more details, open ThinAir, press F1 and into Index tab enter ListView_SetColumnWidth.
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
i'm looking for a tip to block the columns width,
so you can't resize them with mouse...
thanks for reply Petr,
bye
Oscar
Ha!,
my apologies, I understood your request wrong...
Well, thinBASIC does not have native function to do that, but the good news is we can prepare custom function to do this for us.
Just add this function to your code:
And then, somewhere, call it like:Function DisableListviewColumnResize( hDlg As DWord, ctlListview As DWord ) Long hHeader ' -- Win32 messages Long LVM_GETHEADER = %LVM_FIRST + 31 Long HDS_NOSIZING = &H0800 ' -- Mirror, mirror on the wall, who's the header of them all? Control Send hDlg, ctlListview, LVM_GETHEADER, 0, 0 To hHeader ' -- Retrieve header style and modify it Long styleOld = Win_GetWindowLong(hHeader, %GWL_STYLE) Long styleNew = styleOld Or HDS_NOSIZING Win_SetWindowLong(hHeader, %GWL_STYLE, styleNew) End Function
(hDlg = handle of dialog, %myListview = your listview control ID)DisableListviewColumnResize( hDlg, %myListview )
I tested it on my PC, it works, but beware, this functionality is quite new to Win32 API, so it is available from Windows XP up (it will not make effect on earlier Windows).
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Thanks a lot Petr
I will add as native
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
... i'll try it,
thanks Petr
Bookmarks