Print Page | Close Window

Font size in ATLISTBOX

Printed From: Rocket Software
Category: AccuTerm Knowledge Base (read only)
Forum Name: Green Screen
Forum Description: General terminal emulation questions
URL: https://forum.asent.com/forum_posts.asp?TID=2381
Printed Date: March 26 2026 at 8:51pm
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: Font size in ATLISTBOX
Posted By: Shrek59
Subject: Font size in ATLISTBOX
Date Posted: January 22 2014 at 3:21pm
Hi Pete,

I'm updating some (old) screens with scripted listboxes and messageboxes. These are adapted versions of the scripts in the Samples\PickBP folder.

One issue I've found is the font size within the listboxes. I'm actually developing in AT7.1 but deploying (at the moment) in AT 2K2. On my 7.1 list box, the font is large (enough) and quite legible. On the 2K2 screen, the font appears much finer, and appears smaller and less legible. (These are both running on the same PC).

The 'FIXED' variable is set to 0. Setting it to 1 does improved legibility on 2K2, but it looks ugly!

I've tried fiddling with the font settings within AccuTerm, but this doesn't seem to make any difference to the listbox fonts.

I've also tried looking through the WinWrap/Sax basic manual to see if that tells me how to change the font in dialog boxes. The only font settings I see there seem to talk about ini files for the application ... Otherwise dialog boxes are defined in terms of the font size, but it doesn't tell me how to change the font size!

Do you have any suggestions as to how I can change the font or font size in the scripted dialog boxes?

Related to this, the size of the dialog boxes does depend on which monitor I'm displaying it on. The notebook PC's have HD screens and fonts look small, while the external monitors have lower res screens and the fonts look larger. Is there some way to get the screen resolution of the current screen that AccuTerm is displayed on?

This second question is really contingent on being able to change the font size as per the first question. I'm thinking that if the screen resolution is high, then I will set the font or font size to something larger (than standard).

Thanks,

Brian Speirs



Replies:
Posted By: PSchellenbach
Date Posted: January 23 2014 at 4:01am
Hi Brian -

The script-based dialogs are implemented using some fairly old code which was not designed for HD monitors. AccuTerm 2K2 and 7 share the same script engine, so the dialogs should appear quite similar. But, the AT7 executable is marked as a "DPI Aware" application, as most things in AT7 scale properly depending on the DPI and default font size in Windows display settings. But the dialogs are not really DPI aware, so they probably are scaling differently in AT7 and 2K2.

If you feel adventurous, you can use the code in ATSHOWMSG as a guide for creating a custom font for the list box in the dialog. ATSHOWMSG creates a custom font for the text box. Be sure to delete the font after the dialog ends (DeleteObject hFont).

Thanks,

Pete


Posted By: Shrek59
Date Posted: January 23 2014 at 9:56am
Hi Pete,

Thanks for the tips.

I decided I didn't like the font used in ATSHOWMSG. So I investigated using the other standard fonts available to the gdi32 library (once I figured out what was really happening in the script).

I ended up testing for the version of AccuTerm, then if the version was less than 7, using the DEVICE_DEFAULT_FONT (value 14) for the .Listbox element. I then had to scale the height of the listbox up by 30% so it would fit the same amount of information.

I'm suggesting that we upgrade to AT 7 as a better solution!

Cheers,

Brian



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net