[futurebasic] [FB] Change Styled Text Font/Size Question

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 1999 : Group Archive : Group : All Groups

From: SVANVOORST@...
Date: Fri, 30 Apr 1999 21:11:57 EDT
<<...given the edit field of efID, how do you change the font...?>>

Tedd:

You should be able to use EDIT$() to change the font/size of edit field text. 
 Try this code:

COMPILE 0, _caseInsensitive

LOCAL FN buildWnd
  WINDOW#1,"chngFont.demo",(0,0)-(300,200),_docNoGrow
  TEXT _sysFont,14
  EDIT FIELD#-1,"Styled Text",(90,50)-(190,70),2,2
  BUTTON#1,_activeBtn,"Change Font",(90,100)-(200,120),_shadow
  EDIT FIELD(0)
END FN

LOCAL FN chngFont
  tmp$=EDIT$(1)
  TEXT _geneva,9
  EDIT$(1)=tmp$
END FN

LOCAL FN doDialog
  evnt=DIALOG(0)
  id=DIALOG(evnt)
  SELECT evnt
    CASE _btnClick
      FN chngFont
    CASE _wndClose
      END
  END SELECT
END FN

FN buildWnd
ON DIALOG FN doDialog
DO
  HANDLEEVENTS
UNTIL 0

Steve Van Voorst