Hello:
In a ListIcon gadget, I prefer that cells containing numerical values, are aligned to the right.
is this possible??
thank you
how to align numerical cells of a ListIcon to the right?
how to align numerical cells of a ListIcon to the right?
PureBasic: Surprisingly simple, diabolically powerful
-
- Always Here
- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: how to align numerical cells of a ListIcon to the right?
If on Windows, you could use gonzal's PureLVSORT lib (which has many excellent functions):
Code: Select all
PureLVSORT_SetColumnAlignment(#MyListIconGadget,NumberColumn,#PureLVSORT_Right)
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
Re: how to align numerical cells of a ListIcon to the right?
This is also available in the PureVision package using the included PV_Gadgets library...
The command is PVGadgets_JustifyListIconColumn()
This of course is a wrapper for Windows API ...
The command is PVGadgets_JustifyListIconColumn()
This of course is a wrapper for Windows API ...
Code: Select all
ProcedureDLL.l JustifyListIconColumn(GadgetID.l,column.l,flag.l) ;Justify ListIcon Column 0-Left 1-Right 2-Center
lvc.LV_COLUMN
lvc\Mask = #LVCF_FMT
Select flag
Case 1
lvc\fmt=#LVCFMT_RIGHT
Case 2
lvc\fmt=#LVCFMT_CENTER
Default
lvc\fmt=#LVCFMT_LEFT
EndSelect
ProcedureReturn SendMessage_(GadgetID(GadgetID),#LVM_SETCOLUMN,column,@lvc)
EndProcedure
Re: how to align numerical cells of a ListIcon to the right?
Thank you; both
PureBasic: Surprisingly simple, diabolically powerful
- netmaestro
- PureBasic Bullfrog
- Posts: 8451
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: how to align numerical cells of a ListIcon to the right?
Thanks Paul, I didn't know this listview message before.
BERESHEIT
Re: how to align numerical cells of a ListIcon to the right?
For a cross-platform solution (Windows and Linux) take a look
into this code example:
http://www.purebasic.fr/english/viewtop ... 31&start=3
into this code example:
http://www.purebasic.fr/english/viewtop ... 31&start=3