product: web page
version: v14sp2 EPC142040
Hi. Our customer wants to change the color of the line of the list alternately.
I could make it implemented with coding as below.
*****
Selectlist Named(#List1)
Case Of_Field(#STD_FLAG)
When Value_Is(= Y)
Set Com(#ListColumn1.CurrentItem) Mouseoverstyle(#Style2) Style(#Style2)
Set Com(#ListColumn2.CurrentItem) Mouseoverstyle(#Style2) Style(#Style2)
Set Com(#ListColumn3.CurrentItem) Mouseoverstyle(#Style2) Style(#Style2)
Set Com(#ListColumn4.CurrentItem) Mouseoverstyle(#Style2) Style(#Style2)
#STD_FLAG := N
When Value_Is(= N)
Set Com(#ListColumn1.CurrentItem) Mouseoverstyle(#Style3) Style(#Style3)
Set Com(#ListColumn2.CurrentItem) Mouseoverstyle(#Style3) Style(#Style3)
Set Com(#ListColumn3.CurrentItem) Mouseoverstyle(#Style3) Style(#Style3)
Set Com(#ListColumn4.CurrentItem) Mouseoverstyle(#Style3) Style(#Style3)
#STD_FLAG := Y
Endcase
Endselect
*****
However, does anyone know more simple way? Is there suitable property?
AlternBackColor property of VisualStyle in previous version is preferable.
Thank you for your help.
Best regards, Yukiko Ikeo
AlternBackColor for Web page
Re: AlternBackColor for Web page
Checkout the AlternateItemThemeDrawStyle on the List
https://docs.lansa.com/14/en/lansa016/p ... wstyle.htm
Hope this helps,
Joe
https://docs.lansa.com/14/en/lansa016/p ... wstyle.htm
Code: Select all
begin_com role(*EXTENDS #PRIM_WEB) theme(#SYS_THEME<MaterialDesignBlue>)
define_com class(#PRIM_LIST) name(#List1) displayposition(1) left(168) parent(#COM_OWNER) tabposition(1) top(109) width(521) height(244) alternateitemthemedrawstyle('LightAccent')
define_com class(#PRIM_LIST.String) name(#List1Column1) columnunits(Proportion) columnwidth(1.35) displayposition(1) parent(#List1) sortonclick(True) source(#STD_TEXT)
define_com class(#PRIM_LIST.Number) name(#List1Column2) columnunits(Proportion) columnwidth(0.65) displayposition(2) parent(#List1) sortonclick(True) source(#STD_NUM)
evtroutine handling(#Com_owner.Initialize)
clr_list named(#List1)
begin_loop using(#std_num) to(200)
#Std_text := #std_num.AsString
add_entry to_list(#List1)
end_loop
endroutine
end_com
Joe
-
Yukiko Ikeo
- Posts: 26
- Joined: Fri Jun 09, 2017 11:58 pm
Re: AlternBackColor for Web page
Hi Joe,
Thank you for your help.
It worked well
Best regards, Yukiko Ikeo
Thank you for your help.
It worked well
Best regards, Yukiko Ikeo