Jump to content
Sign in to follow this  
Noob

ListView column width question

Recommended Posts

Noob

In my ListView I only need one column. I'd like this column to be quite wide (340 pixels, or as close as I can get to 340px, if possible). However, I don't even know how to stretch it to a half of the width I need.

This is from the Help:

You can control initial column size by padding blanks to the column heading definition. The column can be extend during the GUICtrlCreateListViewItem according to item size. Size of a column will be up to around 25 characters. No resizing will be done during an update by GUICtrlSetData.

The column doesn't seem to automatically extend when an item is added. I looked thru Styles and Extended Styles of GUICtrlCreateListView, but I found nothing of relevance. I must be looking in the wrong places. Could someone suggest what to do? Thanks much in advance.

Share this post


Link to post
Share on other sites
Zedna

Const $LVM_SETCOLUMNWIDTH = 0x101E
Const $LVSCW_AUTOSIZE = -1
oÝ÷ Ù«­¢+ÙU%
ÑɱM¹5Í ÀÌØí1¥ÍÑY¥ÜÄ°ÀÌØí1Y5}MQ
=1U59]%Q °À°ÌÐÀ¤

you must call this everytime after change/add data in ListView

Share this post


Link to post
Share on other sites
PsaltyDS

Const $LVM_SETCOLUMNWIDTH = 0x101E
[code]GUICtrlSendMsg($ListView1, $LVM_SETCOLUMNWIDTH, 0, 340)oÝ÷ Ûú®¢×׫zËb
÷Z¥zÚòx-«hºÒ¢éÝÊj}ý¶f¤zØ^rnz®×­çî"vØh~Ø^rí®b*.v÷öÜÖ¡¢¸³¢{ZÇ+¢Y[j² ¹ë,Û!¢é]«Þm秡»â¢ë-«mç(Úè¬nÝz»Ûa¢Ç¢·^®ÈZ½ì"vØp

:shocked:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites
Noob

Zedna, it works :shocked: You've help me big! Thanks VERY much!

EDIT: PsalyDS, thanks!

Edited by Noob

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  

×