Automan Empire Posted April 20, 2006 Posted April 20, 2006 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) $item3=GUICtrlCreateListViewItem("etc.|B|600000|35",$listview) $item4=GUICtrlCreateListViewItem("|B|400000|35",$listview) $item5=GUICtrlCreateListViewItem("|B|3000|35",$listview) $item6=GUICtrlCreateListViewItem("|B|250000|35",$listview) $item7=GUICtrlCreateListViewItem("|B|79000|35",$listview) $item8=GUICtrlCreateListViewItem("|B|480000|35",$listview) $item9=GUICtrlCreateListViewItem("|B|37000|35",$listview) GUISetState() GUICtrlSetData($item2,"||55555|",);this changes data in the specified location Do $msg = GUIGetMsg () Until $msg = $GUI_EVENT_CLOSE Thanks for any suggestions "I've seen your work in the past, and it's novice at best..." SmOke_N
GaryFrost Posted April 20, 2006 Posted April 20, 2006 Requires beta _GUICtrlListViewJustifyColumn($h_listview, $i_col[, $i_justification=0]) $i_justification 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.
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