Files
MBS/TEST/MultipleDialogs/Styles.4gl
T

51 lines
1.6 KiB
Plaintext

# Property of Four Js*
# (c) Copyright Four Js 1995, 2019. All Rights Reserved.
# * Trademark of Four Js Development Tools Europe Ltd
# in the United States and elsewhere
#
# Four Js and its suppliers do not warrant or guarantee that these
# samples are accurate and suitable for your purposes. Their inclusion is
# purely for information purposes only.
FUNCTION addCommonStyles()
DEFINE r, sl, s, a om.DomNode
DEFINE nl om.NodeList
LET r = ui.Interface.getRootNode()
LET nl = r.selectByTagName("StyleList")
LET sl = nl.item(1)
LET s = sl.createChild("Style")
CALL s.setAttribute("name", ":query")
CALL sl.appendChild(s)
LET a = s.createChild("StyleAttribute")
CALL s.appendChild(a)
CALL a.setAttribute("name", "backgroundColor")
CALL a.setAttribute("value", "yellow")
END FUNCTION
FUNCTION addStyleList1()
DEFINE r, sl, s, a om.DomNode
DEFINE nl om.NodeList
LET r = ui.Interface.getRootNode()
LET nl = r.selectByTagName("StyleList")
LET sl = nl.item(1)
LET s = sl.createChild("Style")
CALL s.setAttribute("name", ":odd")
CALL sl.appendChild(s)
LET a = s.createChild("StyleAttribute")
CALL s.appendChild(a)
CALL a.setAttribute("name", "backgroundColor")
CALL a.setAttribute("value", "#FFFFDD")
LET s = sl.createChild("Style")
CALL s.setAttribute("name", ":even")
CALL sl.appendChild(s)
LET a = s.createChild("StyleAttribute")
CALL s.appendChild(a)
CALL a.setAttribute("name", "backgroundColor")
CALL a.setAttribute("value", "#EEFFFF")
END FUNCTION