VLF-ONE DataTable Color Changes
Posted: Thu Sep 20, 2018 4:22 am
In VLF-ONE I have a data table that contains a Reusable Part and a couple strings
The part looks like this.
Nothing terribly special.
When this renders, the RP text is lighter than the other columns Why is this?
The same thing DOES NOT happen in normal VLWeb.
I can change it to be different colors when the themes, but leaving the theme empty renders a light grey. That SAME CONTROL (PRIM_MD.Label) outside a list renders the correct color.
I have a theme Customizer in place:
And a Theme
Code: Select all
define_com class(#PRIM_LIST.Part) name(#ColumnASCCHDP011) columnwidth(3) design(#ASCCHDInstanceListCellDesign) displayposition(1) parent(#DataList) columncaption('Name') columnunits(Proportion)
define_com class(#PRIM_LIST.String) name(#ColumnWK_STR21) columnwidth(1) displayposition(2) parent(#DataList) source(#wk_String2) columncaption('Date') columncaptiontype(Caption) columnunits(Proportion)
define_com class(#PRIM_LIST.String) name(#ColumnWK_STR31) columnwidth(1) displayposition(3) parent(#DataList) source(#wk_String3) columncaption('Amount') columncaptiontype(Caption) columnunits(Proportion)
Code: Select all
function options(*DIRECT)
begin_com role(*EXTENDS #PRIM_PANL *implements #Prim_List.iListCellDesign *ListFields #ListFields) displayposition(1) left(0) tabposition(1) top(0) width(361) layoutmanager(#MainLayout) themedrawstyle('ForegroundTheme') height(145)
* ================================================================================
* LAYOUT
* ================================================================================
define_com class(#PRIM_VS.Style) name(#Style1) fontsize(80) fontunits(Percent)
define_com class(#PRIM_TBLO) name(#MainLayout)
define_com class(#PRIM_TBLO.Row) name(#Layout1Row1) displayposition(1) parent(#MainLayout)
define_com class(#PRIM_TBLO.Column) name(#Layout1Column1) displayposition(1) parent(#MainLayout)
define_com class(#PRIM_TBLO.Item) name(#MainLayoutItem1) alignment(CenterLeft) column(#Layout1Column1) manage(#NameLabel) parent(#MainLayout) row(#Layout1Row1) sizing(FitToWidth) flow(CenterVertical)
define_com class(#PRIM_TBLO.Item) name(#MainLayoutItem2) alignment(CenterLeft) column(#Layout1Column1) manage(#PayLabel) parent(#MainLayout) row(#Layout1Row1) sizing(FitToWidth) flow(CenterVertical) marginleft(10)
define_com class(#PRIM_TBLO.Item) name(#MainLayoutItem3) alignment(CenterLeft) column(#Layout1Column1) manage(#BillLabel) parent(#MainLayout) row(#Layout1Row1) sizing(FitToWidth) flow(CenterVertical) marginleft(10)
define_com class(#PRIM_MD.Label) name(#NameLabel) displayposition(1) left(0) parent(#COM_OWNER) tabposition(1) top(35) width(361) caption('[Name]') height(25)
define_com class(#PRIM_MD.Label) name(#PayLabel) caption('[PayDescription]') displayposition(2) parent(#COM_OWNER) tabposition(2) top(60) width(351) height(25) style(#Style1)
define_com class(#PRIM_MD.Label) name(#BillLabel) caption('[Bill Description]') displayposition(3) parent(#COM_OWNER) tabposition(3) top(85) width(351) height(25) style(#Style1)
* ================================================================================
* UI COMPONENTS
* ================================================================================
* ================================================================================
* FIELDS
* ================================================================================
group_by name(#ListFields) fields(#wk_String1 #STD_CODES)
* ================================================================================
* ROUTINES
* ================================================================================
mthroutine name(OnAdd) options(*REDEFINE)
#NameLabel := #wk_String1
if (#STD_CODES = P)
#COM_SELF.ToggleDescriptions( True )
else
#COM_SELF.ToggleDescriptions( False )
endif
endroutine
mthroutine name(ToggleDescriptions)
define_map for(*INPUT) class(#PRIM_BOLN) name(#pVisible)
#PayLabel.Visible := #pVisible
#BillLabel.Visible := #pVisible
endroutine
end_com
When this renders, the RP text is lighter than the other columns Why is this?
The same thing DOES NOT happen in normal VLWeb.
I can change it to be different colors when the themes, but leaving the theme empty renders a light grey. That SAME CONTROL (PRIM_MD.Label) outside a list renders the correct color.
I have a theme Customizer in place:
Code: Select all
function options(*DIRECT)
begin_com role(*EXTENDS #VF_AC033O)
define_com class(#VF_SY170O) name(#VF_SY170O)
mthroutine name(Customize) options(*REDEFINE)
define_com class(#PRIM_ALPH) name(#lBlue)
define_com class(#PRIM_ALPH) name(#lPurple)
* #lBlue := "0:114:198"
#lBlue := "0:82:136"
#lPurple := "102:57:183"
for each(#theme) in(#Themes)
case of_field(#theme.SymbolicName)
when ('= MATERIALBLUE' '= BLUE')
#theme.BaseTitleStyle.NormBackColor := #lBlue
#theme.FloatingPanel_AtFrontTitleStyle.NormBackColor := #lBlue
#theme.FloatingPanel_AtFrontBorderBrush.Color := #lBlue
otherwise
#theme.Enabled := False
endcase
endfor
endroutine
end_com
Code: Select all
begin_com role(*EXTENDS #PRIM_THM) basetheme(MaterialDesignBlue) theme500color(0:118:192) theme700color(0:82:136) theme100color(0:150:214) themeaccentmediumcolor(102:57:180) themetextcolor(88:89:91)
define_com class(#PRIM_THM.DrawStyle) name(#PopupTitleBar) style(#Style1)
define_com class(#PRIM_VS.Style) name(#Style1) backgroundbrush(#Brush1) foregroundbrush(#Brush2)
define_com class(#PRIM_VS.SolidBrush) name(#Brush2) color(255:255:255)
define_com class(#PRIM_VS.SolidBrush) name(#Brush1) color(Theme700)
end_com