Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Find all LIST with DROP and make easier to see. Color light yellow like Tool Tip, add margin, grid lines lighter
!See https://clarionhub.com/t/how-to-make-drop-list-more-visible-on-the-window/3760?u=carlbarnes
!Make Drop lists more visible coloring like Tool Tip, easier to see with Format and +1 Line Spacing
!-------------------------
DropListPretty PROCEDURE
Fld LONG,AUTO
LstFEQ LONG,AUTO !Drop List is separate control Fld{PROP:Drop}
CODE
Fld=0
LOOP
Fld=0{PROP:NextField,Fld}
IF Fld=0 THEN BREAK.
CASE Fld{PROP:Type}
OF CREATE:List
OROF CREATE:Combo
LstFEQ = Fld{PROP:ListFEQ}
IF LstFEQ AND Fld{PROP:Drop}>0 THEN
LstFEQ{PROP:LineHeight}=1 + LstFEQ{PROP:LineHeight} ! +1 more line space easier to read
IF LstFEQ{PROP:Background}=COLOR:None THEN
LstFEQ{PROP:Background}=COLOR:InfoBackground !Yellow like tip
LstFEQ{PROP:FontColor} =COLOR:InfoText !font color like tip should be black
END
IF ~LstFEQ{PROP:FORMAT} THEN
LstFEQ{PROP:FORMAT}='999L(2)@s255@' !Margin of 2 else tight to line
END
!affects Entry not LIST --> LstFEQ{PROP:TextLeftMargin}=10
ELSE
LstFEQ=Fld !Normal LIST se set FEQ
END !If Drop List
LstFEQ{PROPLIST:Grid}=COLOR:ScrollBar !Color a Column Lines a bit Lighter than default dark gray
END !Case LIST or Combo
END !Loop Fields
RETURN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment