Code: Select all
Define_Com Class(#prim_acol<#prim_EVEF>) Name(#pFldFields)
Evtroutine Handling(#Com_owner.CreateInstance)
For Each(#Member) In(#Com_owner.ComponentMembers) Operation(*Instance_Of #prim_EVEF)
#pFldFields.Insert( #Member )
Endfor
Endroutine
Code: Select all
Evtroutine Handling(#Com_owner.DesignChanged) Design(#Design)
* If no design instance supplied, it must be the default "desktop" size
If (#Design *Is *null)
#Com_owner.SizeForDesktop
Else
If (#Design.Name = Mobile)
#Com_owner.SizeForMobile
Endif
Endif
Endroutine
Mthroutine Name(SizeForMobile)
#pFldFields<>.LabelPosition := None
#pFldFields<>.Height := 30
#pFldFields<>.MarginLeft := 0
#pFldFields<>.MarginTop := 50
For Each(#oFld) In(#pFldFields)
#oFld.placeholder := #oFld.LabelText
Endfor
Endroutine
Mthroutine Name(SizeForDesktop)
#pFldFields<>.LabelPosition := Left
#pFldFields<>.Height := 25
#pFldFields<>.MarginLeft := 150
#pFldFields<>.MarginTop := 0
* remove placeholder
#pFldFields<>.placeholder := *blanks
Endroutine
It's only possible to set the Placeholder during createInstance but not dynamic
Code: Select all
Evtroutine Handling(#Com_owner.CreateInstance)
For Each(#Member) In(#Com_owner.ComponentMembers) Operation(*Instance_Of #prim_EVEF)
#pFldFields.Insert( #Member )
#Member.placeholder := #Member.LabelText
Endfor
Endroutine