Search the Community
Showing results for tags 'number format'.
-
I am tracking this topic by @LarsJ. It is very advanced and overkill for what I am currently trying to do. Problem is this. Listview contains columns, one of which is right aligned and gets populated by float values, such as 123.99. Some do not have decimals ie 124.00 and on sort gets truncated to 124. Its obviously still the same value, but the display has reset. ; line below is for list VIEW ;..................................0.........1......2............ $cListView = GUICtrlCreateListView("CUSTOMER|AMOUNT|DESCRIPTION", 8, 152, 764, 279) GUICtrlSetBkColor($cListView, $GUI_BKCOLOR_LV_ALTERNATE) ; alternate between the listview background color and the listview item background color GUICtrlSetBkColor($cListView, $LVStdClr) ; Set the background color for the listview _GUICtrlListView_SetColumnWidth($cListView, 0, 120) ; -- the client name _GUICtrlListView_SetColumnWidth($cListView, 1, 90) ;-- the amount _GUICtrlListView_JustifyColumn($cListView, 1, 1) ; 1 - Text is right aligned _GUICtrlListView_SetColumnWidth($cListView, 2, 200) ; the description What I am looking for is something native and simple like a _GUICtrlListView_SetColumnFormat($cListView, 1, "%.2f") ; 1 - column is stringformatted to "%.2f" So that after each sort it will appear as it was in the original rendering. Is there something like this? I have not been able to find a simple solution. Thanks. Skysnake