Page 1 of 1

Posted: Wed Jan 30, 2002 10:10 am
by BackupUser
Restored from previous forum. Originally posted by Manolo.

Hi,
I need aligner numbers in a ListIconGadget. The ListIcon have 8 columns and I only need this feature in the 6th, 7th and 8th columns.
You can helpme??
Thanks,
Manolo
[url]mailto:vpardo@infonegocio.com[/url]

Posted: Mon Feb 04, 2002 11:54 am
by BackupUser
Restored from previous forum. Originally posted by Manolo.
Hi,
I need aligner numbers in a ListIconGadget. The ListIcon have 8 columns and I only need this feature in the 6th, 7th and 8th columns.
You can helpme??
Thanks,
Manolo
[url]mailto:vpardo@infonegocio.com[/url]

Hi guys,
Is possible that you helpme??
Thanks

Posted: Mon Feb 04, 2002 12:37 pm
by BackupUser
Restored from previous forum. Originally posted by Stan.
Hi,
I need aligner numbers in a ListIconGadget. The ListIcon have 8 columns and I only need this feature in the 6th, 7th and 8th columns.
You can helpme??
Hi,
Can you be more specific ? One or two examples would help.
Bests.


Learning and Love are what life is all about ... [ PB. registered user ]

Posted: Mon Feb 04, 2002 1:05 pm
by BackupUser
Restored from previous forum. Originally posted by El_Choni.

Hi Manolo,

I understand whant you want, personally I've been looking for the answer, but haven't found it, that's why I haven't replied. Sorry.

Bye,

El_Choni

Posted: Mon Feb 04, 2002 2:53 pm
by BackupUser
Restored from previous forum. Originally posted by El_Choni.

Ok, here it is:

Code: Select all

lvc.LV_COLUMN

lvc\imask = #LVCF_FMT

InitGadget(1)

If OpenWindow(1,#CW_USEDEFAULT,#CW_USEDEFAULT,#CW_USEDEFAULT,#CW_USEDEFAULT,#PB_Window_SystemMenu|#PB_Window_MinimizeGadget,"ListIconGadget column align example")

  LVWidth = WindowWidth() - 4
  
  If CreateGadgetList(WindowID())
    ListIconGadget = ListIconGadget(0, 0, 0, LVWidth, WindowHeight()-30, "This", LVWidth/4-1)
    AddGadgetColumn(0, 1, "is", LVWidth/4-1)
    AddGadgetColumn(0, 2, "a", LVWidth/4-1)
    AddGadgetColumn(0, 3, "test", LVWidth/4-1)
  EndIf

  col = 1
  lvc\fmt = #LVCFMT_RIGHT
  SendMessage_(ListIconGadget, #LVM_SETCOLUMN, col, @lvc)
  col = 2
  lvc\fmt = #LVCFMT_CENTER
  SendMessage_(ListIconGadget, #LVM_SETCOLUMN, col, @lvc)
  col = 3
  lvc\fmt = #LVCFMT_LEFT ; not really needed, left is the default
  SendMessage_(ListIconGadget, #LVM_SETCOLUMN, col, @lvc)

  AddListIconGadgetItem(0, 0, "Column 1"+Chr(10)+"Column 2"+Chr(10)+"Column 3"+Chr(10)+"Column 4", 0)
  AddListIconGadgetItem(0, 1, "The first column"+Chr(10)+"must"+Chr(10)+"always"+Chr(10)+"be", 0)
  AddListIconGadgetItem(0, 2, "left aligned,"+Chr(10)+"the others"+Chr(10)+"may"+Chr(10)+"not.", 0)

  Repeat

    EventID.l = WaitWindowEvent()

    Select EventID
      Case #PB_EventCloseWindow
        Quit = 1
    EndSelect
  Until Quit = 1
EndIf

End
Bye,

El_Choni