Topic: Appgraphics Textbox Font

I seem to be having a problem changing the Font type in a Textbox() using Appgraphics.  In addition, the text is always displayed as Top-justified even when it's set to Bottom-justified with the command Settextjustify(LEFT_TEXT, BOTTOM_TEXT).

Changing the font to another type doesn't appear to change anything.

Any advice on how to solve this issue is welcome.

Frank

Re: Appgraphics Textbox Font

The font functions are meant to apply only to "drawn" text, like the outtext subroutine.  However, there is no good reason that they shouldn't also apply to text boxes.  I'll see what can be done to support this feature.

Jeff Armstrong
Approximatrix, LLC

Re: Appgraphics Textbox Font

An additional matter of text in dialogs is the following
      Call settextstyle(windows_font, horiz_dir,16)
results in a text height of 10 pixels unless an other height is defined   
But if the call settextstyle is omitted a lager letter appears.
Klaus

Re: Appgraphics Textbox Font

Klaus,

The default font for any text in AppGraphics will always be DEFAULT_FONT, which is the blocky Windows system font. DEFAULT_FONT is size-configurable,and it might default to 12 pixels or something similar.  It is not the same as WINDOWS_FONT.

If you specify WINDOWS_FONT, it configures the font to be the current theme's font for static text.  The documentation does state that the height argument to settextstyle is ignored when this font is chosen since it is attempting to match the current theme of the system.

I'm currently working on allowing text box fonts to be set.  The feature should be present in the next release.

Jeff Armstrong
Approximatrix, LLC

Re: Appgraphics Textbox Font

The next version of AppGraphics should fix quite a few of the complaints above.  First, the font settings will now apply to everything, including buttons, text boxes, lists, outtext calls, etc. The only things that will remain unchanged will be the menu and title bar.

Also, using WINDOWS_FONT will now also allow specifying the character height. If anyone wants to use the Windows standard font, one would now call setmatchthemetextstyle(), which takes no arguments.

Finally, the vertical justification of text in a textbox won't be user-specifiable.  Windows does not actually support this natively. We'd have to implement a custom widget within AppGraphics, and I'm not sure its a particularly good idea.  If you do a search for "win32 edit box vertical justify," you'll find quite a few articles about the problem.

Jeff Armstrong
Approximatrix, LLC

Re: Appgraphics Textbox Font

Jeff,

Thank you for taking the time to improve the functionality of AppGraphic text settings.

I assume that this was not a particularly easy task to make the font settings apply to buttons, text boxes, outtext, and everything else but the main menu and title bar.

I look forward to applying the next version of AppGraphics to my application.

Frank