Just starting out? Need help? Post your questions and find answers here.
User avatar
Peter
 
Posts: 445
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1

Re: ListIconGadget - right align a column's content

by Peter Fri Dec 29, 2017 10:06 am

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
Dirk Geppert
 
Posts: 45
Joined: Fri Sep 22, 2017 7:02 am

Re: ListIconGadget - right align a column's content

by Dirk Geppert Tue Jan 02, 2018 12:11 pm

Okay, I'll wait patiently: -)
the.weavster
 
Posts: 128
Joined: Sat Mar 01, 2014 3:02 pm

Re: ListIconGadget - right align a column's content

by the.weavster Thu Jan 04, 2018 10:57 am

Sorry, Peter, but I have another request :oops: :
Code: Select all
SetHeaderStyle(Gadget,BackColor.s,TextColor.s,Height)
User avatar
Peter
 
Posts: 445
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1

Re: ListIconGadget - right align a column's content

by Peter Thu Jan 04, 2018 12:01 pm

the.weavster wrote:Sorry, Peter, but I have another request :oops: :
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
the.weavster
 
Posts: 128
Joined: Sat Mar 01, 2014 3:02 pm

Re: ListIconGadget - right align a column's content

by the.weavster Thu Jan 04, 2018 12:10 pm

Peter wrote:BackColor and TextColor are not that difficult.
I'd happily settle for that :)
User avatar
Peter
 
Posts: 445
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1

Re: ListIconGadget - right align a column's content

by Peter Thu Jan 04, 2018 12:55 pm

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
the.weavster
 
Posts: 128
Joined: Sat Mar 01, 2014 3:02 pm

Re: ListIconGadget - right align a column's content

by the.weavster Fri Jan 05, 2018 10:02 am

Thanks :D
Return to Coding Questions

Who is online

Users browsing this forum: No registered users and 2 guests