Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » [BUG] GridCtrl uses wrong sorting icon order.
[BUG] GridCtrl uses wrong sorting icon order. [message #40342] |
Mon, 22 July 2013 16:55 |
|
Klugier
Messages: 1077 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello,
I have noticed that GridCtrl uses wrong sorting icon order. Why we need to change this behavior? Beacuse, it seems most of GUI frameworks such as Qt or GTK use revert notation. Moreover this notation is more intuitive for casual user.
What we need to do is just replace images order (GridCtrl/GridDisplay.cpp - line 214):
if(sortmode == 1)
w.DrawImage(xf, yf, GridImg::SortDsc(), col);
else
w.DrawImage(xf, yf, GridImg::SortAsc(), col);
Insted of
if(sortmode == 1)
w.DrawImage(xf, yf, GridImg::SortAsc(), col);
else
w.DrawImage(xf, yf, GridImg::SortDsc(), col);
The other better solution is just replace icons names in GridCtrl.iml file. (SortDsc -> SortAsc, SortAsc -> SortDsc).
Sincerely,
Klugier
U++ - one framework to rule them all.
|
|
|
Re: [BUG] GridCtrl uses wrong sorting icon order. [message #40658 is a reply to message #40342] |
Mon, 26 August 2013 20:34 |
|
Klugier
Messages: 1077 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello Guys,
Now, GridCtrl has one more static method:
GridCtrl::ReverseSortIcon(bool b = true);
which is reversing sorting icons order gloablly.
How you can use it? Example:
static void initCtrls();
GUI_APP_MAIN
{
initCtrls();
// ...
}
void initCtrls()
{
GridCtrl::ReverseSortIcon(true);
}
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Mon, 26 August 2013 20:37] Report message to a moderator
|
|
|
Goto Forum:
Current Time: Mon Jun 10 12:21:40 CEST 2024
Total time taken to generate the page: 0.01812 seconds
|