Page 1 of 1

VL-Web Applying style to cell of list control

Posted: Thu Jul 28, 2016 4:22 pm
by MegumiSawada
Hi,

The customer would like to apply a style to the specific cell of list control.
Could you please give me an advice?

Code: Select all

Begin_Com Role(*EXTENDS #PRIM_WEB) Height(608) Width(1184)
Define_Com Class(#PRIM_VS.Style) Name(#Style1) Backgroundbrush(#Brush1)
Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush1) Color(255:29:224)

Define_Com Class(#PRIM_LIST.String) Name(#ColumnEMPNO) Displayposition(1) Parent(#List2) Source(#EMPNO) Columnwidth(143) Style(#Style1)
Define_Com Class(#PRIM_LIST) Name(#List2) Displayposition(1) Left(0) Parent(#COM_OWNER) Tabposition(1) Top(0) Height(201) Width(833)
Define_Com Class(#PRIM_PHBN) Name(#Button1) Caption('Button1') Displayposition(2) Left(622) Parent(#COM_OWNER) Tabposition(2) Top(238)

Evtroutine Handling(#Com_owner.Initialize)
#COM_OWNER.SET_LIST
Endroutine

Mthroutine Name(SET_LIST)
#EMPNO := 'A0001'
Add_Entry To_List(#List2)
#EMPNO := 'A0002'
Add_Entry To_List(#List2)
#EMPNO := 'A0003'
Add_Entry To_List(#List2)
#EMPNO := 'A0004'
Add_Entry To_List(#List2)
#EMPNO := 'A0005'
Add_Entry To_List(#List2)
Endroutine

Evtroutine Handling(#Button1.Click)
Define Field(#PGMCUNT) Type(*DEC) Length(10) Decimals(0)
#PGMCUNT := 0
Selectlist Named(#List2)
#PGMCUNT += 1
Case Of_Field(#PGMCUNT)
When Value_Is(= 2 = 4)
*****Here they would like to apply style to the cell #ColumnEMPNO *****
#ColumnEMPNO.CurrentItem.ReadOnly := True
Otherwise
#ColumnEMPNO.CurrentItem.ReadOnly := False
Endcase
Endselect
Endroutine
End_Com
Thank you in advance.

Best Regards,
Megumi Sawada

Re: VL-Web Applying style to cell of list control

Posted: Fri Jul 29, 2016 12:25 pm
by Stewart Marshall
Hi Megumi

The Style and MousoverStyle for an individual cell can be addressed as follows

Code: Select all

#ColumnXxxxx.CurrentItem.Style <= #Style
#ColumnXxxxx.CurrentItem.MouseOverStyle <= #Style
Regards

Re: VL-Web Applying style to cell of list control

Posted: Tue Aug 02, 2016 6:11 pm
by MegumiSawada
Hi Stewart,

It worked! Thank you!

Best Regagrds,Megumi