Font picker - Clipper

This is a discussion on Font picker - Clipper ; I'm working of a piece of code that allows the user to enter the properties of a Fixed Text control that is stored in a database and will be loaded at runtime to generate a FT control on a window ...

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Font picker

  1. Default Font picker

    I'm working of a piece of code that allows the user to enter the
    properties of a Fixed Text control that is stored in a database and will
    be loaded at runtime to generate a FT control on a window together with
    other controls.

    Origin and size is quite easy but font face, font size, font weight,
    font color etc is more complicated to get working nicely.

    I wonder wether there is a FontPicker class that provides ACCESSes for
    the font properties that I require to store so I can Init a Font at runtime.

    John

  2. Default Re: Font picker

    John,

    > Origin and size is quite easy but font face, font size, font weight, font
    > color etc is more complicated to get working nicely.
    >
    > I wonder wether there is a FontPicker class that provides ACCESSes for the
    > font properties that I require to store so I can Init a Font at runtime.


    Take a look at the GUI Classes SDK.AEF, a module called "Font" is there.
    Eg: ACCESS __FontFaceName AS STRING PASCAL CLASS Font

    hth,
    Saulo



  3. Default Re: Font picker

    Saulo,

    This expects that you already have a font selected.

    I would like to have a window where the user can select the font with
    all of it's properties and then store the properties so I can make the
    right font at runtime.

    John


    Saulo Rodrigues schreef:
    > John,
    >
    >> Origin and size is quite easy but font face, font size, font weight, font
    >> color etc is more complicated to get working nicely.
    >>
    >> I wonder wether there is a FontPicker class that provides ACCESSes for the
    >> font properties that I require to store so I can Init a Font at runtime.

    >
    > Take a look at the GUI Classes SDK.AEF, a module called "Font" is there.
    > Eg: ACCESS __FontFaceName AS STRING PASCAL CLASS Font
    >
    > hth,
    > Saulo
    >
    >


  4. Default Re: Font picker

    Hi John,

    On Mon, 16 Jun 2008 15:58:57 +0200, John Martens <adsl672100@tiscali.nl> wrote:

    >...
    >...
    >I wonder wether there is a FontPicker class that provides ACCESSes for
    >the font properties that I require to store so I can Init a Font at runtime.


    Have a look at StandardFontDialog class in your help

    HTH,
    Amilcar A. Camargo F.
    Guatemala, C. A.

  5. Default Re: Font picker

    Amilcar,

    Looks like the window I was lokking for.

    It seems not possible to set the Initial font like InitialDirectory with
    StadardFolderDialog. This is handy is the user already selected a font
    and just wants to modify it.

    Is setting the initial font not possible ?

    John


    Amilcar A. Camargo schreef:
    > Hi John,
    >
    > On Mon, 16 Jun 2008 15:58:57 +0200, John Martens <adsl672100@tiscali.nl> wrote:
    >
    >> ...
    >> ...
    >> I wonder wether there is a FontPicker class that provides ACCESSes for
    >> the font properties that I require to store so I can Init a Font at runtime.

    >
    > Have a look at StandardFontDialog class in your help
    >
    > HTH,
    > Amilcar A. Camargo F.
    > Guatemala, C. A.


  6. Default Re: Font picker

    Amilcar,

    oFont:Height seems not to give the fontsize number that you select.

    How can I get the fontsize from a Font var ?

    John


    Amilcar A. Camargo schreef:
    > Hi John,
    >
    > On Mon, 16 Jun 2008 15:58:57 +0200, John Martens <adsl672100@tiscali.nl> wrote:
    >
    >> ...
    >> ...
    >> I wonder wether there is a FontPicker class that provides ACCESSes for
    >> the font properties that I require to store so I can Init a Font at runtime.

    >
    > Have a look at StandardFontDialog class in your help
    >
    > HTH,
    > Amilcar A. Camargo F.
    > Guatemala, C. A.


  7. Default Re: Font picker

    oFont:__PointSize is it.

    John Martens schreef:
    > Amilcar,
    >
    > oFont:Height seems not to give the fontsize number that you select.
    >
    > How can I get the fontsize from a Font var ?
    >
    > John
    >
    >
    > Amilcar A. Camargo schreef:
    >> Hi John,
    >>
    >> On Mon, 16 Jun 2008 15:58:57 +0200, John Martens
    >> <adsl672100@tiscali.nl> wrote:
    >>
    >>> ...
    >>> ...
    >>> I wonder wether there is a FontPicker class that provides ACCESSes
    >>> for the font properties that I require to store so I can Init a Font
    >>> at runtime.

    >>
    >> Have a look at StandardFontDialog class in your help
    >>
    >> HTH,
    >> Amilcar A. Camargo F.
    >> Guatemala, C. A.


  8. Default Re: Font picker

    Hi John,

    Try this:

    METHOD pbFontDialog() CLASS dtaTest1
    LOCAL oFontDlg AS StandardFontDialog
    LOCAL oMyFont AS Font
    // If you want to specify a initial font, save the font
    // class in a bStream file or another appropriate
    // place and read it at start
    SELFDCsle1:TextValue := "Change Font in a SLE"
    SELFDCtxt1:TextValue := "Change Font in a FixedText"
    oFontDlg := StandardFontDialog{SELF }
    IF oFontDlg:Show() // returns a FontObject
    oMyFont := oFontDlg:Font
    ELSE
    // Select a Standard as oMyFont
    ENDIF
    SELFDCsle1:Font := oMyFont
    SELFDCtxt1:Font := oMyFont
    RETURN NIL

    regards
    Urs

    "John Martens" <adsl672100@tiscali.nl> schrieb im Newsbeitrag
    news:48567194$0$24430$5fc3050@news.tiscali.nl...
    > I'm working of a piece of code that allows the user to enter the
    > properties of a Fixed Text control that is stored in a database and will
    > be loaded at runtime to generate a FT control on a window together with
    > other controls.
    >
    > Origin and size is quite easy but font face, font size, font weight, font
    > color etc is more complicated to get working nicely.
    >
    > I wonder wether there is a FontPicker class that provides ACCESSes for the
    > font properties that I require to store so I can Init a Font at runtime.
    >
    > John





  9. Default Re: Font picker

    Urs,

    Thanks.
    Do you also know how to set the Initial Font so that one will be in het
    Dialog when it's shown ?

    John


    Urs Eggmann schreef:
    > Hi John,
    >
    > Try this:
    >
    > METHOD pbFontDialog() CLASS dtaTest1
    > LOCAL oFontDlg AS StandardFontDialog
    > LOCAL oMyFont AS Font
    > // If you want to specify a initial font, save the font
    > // class in a bStream file or another appropriate
    > // place and read it at start
    > SELFDCsle1:TextValue := "Change Font in a SLE"
    > SELFDCtxt1:TextValue := "Change Font in a FixedText"
    > oFontDlg := StandardFontDialog{SELF }
    > IF oFontDlg:Show() // returns a FontObject
    > oMyFont := oFontDlg:Font
    > ELSE
    > // Select a Standard as oMyFont
    > ENDIF
    > SELFDCsle1:Font := oMyFont
    > SELFDCtxt1:Font := oMyFont
    > RETURN NIL
    >
    > regards
    > Urs
    >
    > "John Martens" <adsl672100@tiscali.nl> schrieb im Newsbeitrag
    > news:48567194$0$24430$5fc3050@news.tiscali.nl...
    >> I'm working of a piece of code that allows the user to enter the
    >> properties of a Fixed Text control that is stored in a database and will
    >> be loaded at runtime to generate a FT control on a window together with
    >> other controls.
    >>
    >> Origin and size is quite easy but font face, font size, font weight, font
    >> color etc is more complicated to get working nicely.
    >>
    >> I wonder wether there is a FontPicker class that provides ACCESSes for the
    >> font properties that I require to store so I can Init a Font at runtime.
    >>
    >> John

    >
    >
    >


  10. Default Re: Font picker

    Hi John,

    On Mon, 16 Jun 2008 19:11:11 +0200, John Martens <adsl672100@tiscali.nl> wrote:

    >Amilcar,
    >
    >Looks like the window I was lokking for.
    >
    >It seems not possible to set the Initial font like InitialDirectory with
    >StadardFolderDialog. This is handy is the user already selected a font
    >and just wants to modify it.


    It's not documented but there is a Font:Assign for the window so, just assign
    it before Show() and it should work.

    HTH,
    Amilcar A. Camargo F.
    Guatemala, C. A.

+ Reply to Thread
Page 1 of 2 1 2 LastLast