• Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Application
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Development
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Koda
Opened by Chris Haslam - 04.05.2011

FS#237 - ListView Properties

I suggest that Images be called ImageList. Clearer

Alignment

I read the info on Alignment:

According to MSDN, the alignment of the leftmost column is always left-justified; it cannot be changed.

MSDN says in full:

If a column is added to a list-view control with index 0 (the leftmost column), it is always LVCFMT_LEFT. Setting other flags on column 0 does not override that alignment. Therefore if you keep inserting columns with index 0, the text in all columns are left-aligned. If you want the first column to be right-aligned or centered you can make a dummy column, then insert one or more columns with index 1 or higher and specify the alignment you require. Finally delete the dummy column.
  • Based on MSDN, Koda would not allow me to right justify column 0, Animal
  • So, following the MSDN procedure, I inserted another column and moved it up to be column 0.
  • I set Animal, now column 1, to right justified
  • I deleted column 0.

The form ran OK. The part of the generated code that does the ListView is here:

$ListView2 = GUICtrlCreateListView("Animal|Coat|Feet", 96, 384, 169, 113)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 50)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 50)
_GUICtrlListView_JustifyColumn(GUICtrlGetHandle($ListView2), 0, 1)
$ListView2_0 = GUICtrlCreateListViewItem("Lucas|furry|paws", $List

I am wondering whether Koda would be able to do the work-around automatically, rather than the user having to do it manually. Perhaps Koda would need to create a zero-width column 0 so Object Inspector would allow the first column that shows in Collection editor to be right or center justified.

Just a thought.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing