Original date:2019-08-31 19:29:01 Edited by: irv Subject: Re: EuGTK:Sorting Column of Floats

OK, I've got the custom sort working. It's not much different from Euphoria's custom sort in operation.

At this point, I need to know more about the actual data you're using to be of much more help. You may also need an update to GtkEngine.e. Briefly, however, you set the sort column id for the Price column to -1. That means "use custom sorting".

col3 = create(GtkColumn, 
constant sorted = create(GtkTreeModelSort,store)   
-- store is where you loaded the raw data; 
-- sorted holds no data, just tracks the sorting... 
-- use the sorted model to fill your tree model. 
-- the sorted model "ghosts" the real data and keeps it 
-- sorted based on your custom routines. 
-- the above call toggles the sort direction, and calls the custom  
-- sort functions, which are entirely dependent upon the structure 
-- of the data, no point in trying to guess that! 
Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu