Page 2 of 2
Re: ListIconGadget - right align a column's content
Posted: Fri Dec 29, 2017 10:06 am
by Peter
Dirk Geppert wrote:Thank you Peter. Would it be possible to extend the ListiconGadget() that you can sort with it?
that's not that easy. I'm on it.
Greetings ... Peter
Re: ListIconGadget - right align a column's content
Posted: Tue Jan 02, 2018 12:11 pm
by Dirk Geppert
Okay, I'll wait patiently: -)
Re: ListIconGadget - right align a column's content
Posted: Thu Jan 04, 2018 10:57 am
by the.weavster
Sorry, Peter, but I have another request
:
Code: Select all
SetHeaderStyle(Gadget,BackColor.s,TextColor.s,Height)
Re: ListIconGadget - right align a column's content
Posted: Thu Jan 04, 2018 12:01 pm
by Peter
the.weavster wrote:Sorry, Peter, but I have another request
:
Code: Select all
SetHeaderStyle(Gadget,BackColor.s,TextColor.s,Height)
BackColor and TextColor are not that difficult. But setting the text height will be a challenge...
Greetings ... Peter
Re: ListIconGadget - right align a column's content
Posted: Thu Jan 04, 2018 12:10 pm
by the.weavster
Peter wrote:BackColor and TextColor are not that difficult.
I'd happily settle for that
Re: ListIconGadget - right align a column's content
Posted: Thu Jan 04, 2018 12:55 pm
by Peter
the.weavster wrote:I'd happily settle for that
ok
paste this on in
DeclareModule ListIconGadgetEx:
Code: Select all
Declare SetColumnHeaderColor(Gadget, Column, BackColor.s, FrontColor.s)
and this one in
Module ListIconGadgetEx:
Code: Select all
Procedure SetColumnHeaderColor(Gadget, Column, BackColor.s, FrontColor.s)
GetGrid
! var id = "ligchc_" + grid.id + "_" + v_column;
! $("#" + id).remove();
! $("<style id='" + id + "'>" + "#" + grid.id + " .dgrid-column-" + v_column + "[role='columnheader'] { color: " + v_frontcolor + "; background-color: " + v_backcolor + "; }</style>").appendTo("head");
EndProcedure
you can call it with:
Code: Select all
ListIconGadgetEx::SetColumnHeaderColor(#yourListIconGadget, 0, "red", "yellow") ; setting the color for first columnheader
Greetings ... Peter
Re: ListIconGadget - right align a column's content
Posted: Fri Jan 05, 2018 10:02 am
by the.weavster
Thanks