Jump to content

Increasing Cell Padding in a GuiCtrlcreatelistview


Recommended Posts

I am using:

GUICtrlCreateListView("Time | Discription", 368, 32, 241, 295, BitOR($LVS_REPORT,$LVS_NOSORTHEADER,$LVS_SINGLESEL,$LVS_SHOWSELALWAYS))

I write information to this window via

Guictrlcreatelistviewitem (datetime() & "| " & $discription, $Reports)

the issue I am having the issue with my description cell not being wide enough for the text i am putting into it.

I would like to increase the width length of it.

Is there any way to do this?

Link to comment
Share on other sites

Yes there is a way to do this , the function you want is _GUICtrlListView_SetColumnWidth , the helpfile has an example of its use :(

GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.
Link to comment
Share on other sites

Yes there is a way to do this , the function you want is _GUICtrlListView_SetColumnWidth , the helpfile has an example of its use :(

I see the help file, but how do i get the function? or where?

Link to comment
Share on other sites

Open Auoit's helpfile, in the tree view contents goto User Defined Functions Reference > GuiListView Management.

Edit - added a script to find it for you :(

#Include <GuiTreeView.au3>

If Not WinExists("AutoIt Help") Then
    MsgBox(0,"","Please open the AutoIt Help File")
    Exit
EndIf
WinActivate("AutoIt Help")
$hTreeView = ControlGetHandle("AutoIt Help", "", "SysTreeView321")
$hItemInTree = _GUICtrlTreeView_FindItem ($hTreeView, "_GUICtrlListView_SetColumnWidth")
_GUICtrlTreeView_EnsureVisible ($hTreeView, $hItemInTree)
_GUICtrlTreeView_ClickItem ($hTreeView, $hItemInTree)
Edited by Yoriz
GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.
Link to comment
Share on other sites

Open Auoit's helpfile, in the tree view contents goto User Defined Functions Reference > GuiListView Management.

Edit - added a script to find it for you :(

#Include <GuiTreeView.au3>

If Not WinExists("AutoIt Help") Then
    MsgBox(0,"","Please open the AutoIt Help File")
    Exit
EndIf
WinActivate("AutoIt Help")
$hTreeView = ControlGetHandle("AutoIt Help", "", "SysTreeView321")
$hItemInTree = _GUICtrlTreeView_FindItem ($hTreeView, "_GUICtrlListView_SetColumnWidth")
_GUICtrlTreeView_EnsureVisible ($hTreeView, $hItemInTree)
_GUICtrlTreeView_ClickItem ($hTreeView, $hItemInTree)

$Reports = _GUICtrlListView_Create($Form1_1,"", 368, 32, 315, 295, BitOR($LVS_REPORT,$LVS_NOSORTHEADER,$LVS_SINGLESEL,$LVS_SHOWSELALWAYS))
_GUICtrlListView_AddColumn($Reports,"Time",70,2)
_GUICtrlListView_AddColumn($Reports,"Discription",245,0)

I used the following Code to create the spacing needed incase it is helpful to anyone else.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...