Not that I know of, but if there are more than three, you can shorten it to three:

for i as Integer = 0 to 2
  me.ColumnAlignmnent(i) = me.AlignCenter
next

If this is something that you do often, you might consider subclassing or extending listbox to have an AllignColumns method:

Sub AlignColumns(extends l as ListBox, alignment as Integer)
  for i as Integer = 0 to l.ColumnCount - 1
    l.ColumnAlignment(i) = alignment
  next
End

I believe such a method needs to go in a module.

You could then call it as if it were a built-in method of ListBox:

me.AlignColumns(ListBox.AlignCenter)

Chuck

On May 14, 2006, at 2:53 PM, Jeff Justice wrote:

I have:

me.ColumnAlignment(0)=me.AlignCenter
me.ColumnAlignment(1)=me.AlignCenter
me.ColumnAlignment(2)=me.AlignCenter
me.heading(-1)="Hex"+chr(9)+"Asc"+chr(9)+"Raw"

Is there a way I can shorten the first three lines down to one line?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to