DEFINE VARIABLE font-number AS INTEGER NO-UNDO.
DEFINE VARIABLE max-count AS INTEGER NO-UNDO. max-count = FONT-TABLE:NUM-ENTRIES + 1. REPEAT font-number = 1 to max-count: IF font-number = max-count THEN LEAVE. IF FONT-TABLE:GET-TEXT-HEIGHT-CHARS(font-number) >= 2 THEN LEAVE. END. |
DEFINE VARIABLE font-number AS INTEGER NO-UNDO.
DEFINE VARIABLE in-title AS CHARACTER NO-UNDO. font-number = CURRENT-WINDOW:FONT. SET in-title. IF FONT-TABLE:GET-TEXT-WIDTH-CHARS(font-number, in-title) > 80 THEN MESSAGE "Title" in-title "cannot fit in new window.". |