Jump to content
Sign in to follow this  
Automan Empire

How Can I Align Data Within A Guictrlcreatelistview ?

Recommended Posts

Automan Empire

I have been trying to align data within GUICtrlCreateListViewItem without sucess. As you can see from my example, how can I make the AMOUNT column be right aligned, and if possible, how can I make the TYPE column centered?

Here is some sample code...

#include <GuiConstants.au3>

GUICreate("test data alignment",800,200, 100,200,-1,)
GUISetBkColor (0x00E0FFFF) ; will change background color

$listview = GUICtrlCreateListView ("NAME           |TYPE  |AMOUNT   |OTHER  ",10,10,780,180);,)

$item1=GUICtrlCreateListViewItem("First Name|A|1000000|32",$listview)
$item2=GUICtrlCreateListViewItem("Second Name|B|600000|35",$listview)

GUICtrlSetData($item2,"||55555|",);this changes data in the specified location

  $msg = GUIGetMsg ()

Until $msg = $GUI_EVENT_CLOSE

Thanks for any suggestions :think:

"I've seen your work in the past, and it's novice at best..." SmOke_N

Share this post

Link to post
Share on other sites

Requires beta

_GUICtrlListViewJustifyColumn($h_listview, $i_col[, $i_justification=0])


0 = Left (default)

1 = Right

2 = Center

SciTE for AutoItDirections for Submitting Standard UDFs


Don't argue with an idiot; people watching may not be able to tell the difference.


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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.