FontRequester()

Syntax

Result = FontRequester(FontName$, FontSize, Flags [, Color])
Description
Opens the standard requester to choose a font. If the user cancels the requester, the return value is 0, else it's 1. 'FontName$' and 'FontSize' can be used to set the default font. The commands SelectedFontColor(), SelectedFontName(), SelectedFontSize() and SelectedFontStyle() can be used after a successful call to get the needed information about the selected font. The optional 'Color' parameter can be used to set the default color when the requester is opened.

'Flags' can be one of the following values:
  #PB_FontRequester_Effects : Enable the requesters effects, including color chooser.
Example:
  FontName$ = "Arial"   ; set initial font  (could also be blank)
  FontSize  = 14        ; set initial size  (could also be null)
  Result.l = FontRequester(FontName$, FontSize, #PB_FontRequester_Effects)
  If Result
    a$ = "You have selected following font:"  + Chr(10)  ; Chr(10) only needed
    a$ + "Name:  " + SelectedFontName()       + Chr(10)  ; for line-feed
    a$ + "Size:  " + Str(SelectedFontSize())  + Chr(10)
    a$ + "Color: " + Str(SelectedFontColor())
  Else  
    a$ = "The requester was canceled."
  EndIf
  MessageRequester("Information",a$,0)
  End

Supported OS

All

<- ColorRequester() - Requester Index - InputRequester() ->