ASTROMARK
Overview
White
Paper
Download
Beta
Testing
System
Architecture
Page
Designr Demo
TRAINING
Overview
Delphi
Object
Pascal
CBuilder
ObjectPAL
C
programming
C++
programming
ReportPrinter
ReportSmith
CONSULTING
Overview
GTSIZER
Overview
Trial
Versions
Ordering
Tips/FAQs
Users
Patches
Upgrades
|
|
COMPONENTS
- SIZING
|
| Q. Selectively
resizing controls:
Is it possible to resize only selected controls and leave the other controls
unaffected (on the same form)?
A. In Delphi
4 and 5 and C++Builder 4, you can use the components contraint properties
to limit resizing. Otherwise, GTSizer resizes ALL resizeable components
on a form or none of the components on a form. If you do not wish
to allow the users to resize the controls you can disable the sizing feature
for the form and all controls so that only the resolution independence
is maintained. (Set GTForm1.Enabled := False; in the OnActivate event
of the GTForm). Alternatively, you can set the form's border style
to something other than sizeable. It is possible to maintain a static
font, though, by setting the Tag property of the component. (see "viewing
more grids" below)
Q. Viewing
more grid rows:
Is it possible to resize a DBGrid in such a way that more columns and rows
show?
A. Yes. Use the
IgnoreTag property of the GTSizer and the Tag property of the DBGrid.
The IgnoreFont property allows you to determine the value you wish the
GTSizer to look for in the component's Tag property. The GTSizer
will not resize the font of any component where its Tag property contains
the same value as the GTSizer's IgnoreFont property value. For example,
if you use the default value of 1 for IgnoreTag and set the DBGrid's Tag
property to 1, the GTSizer will not resize the font, thus showing more
columns and rows when the form is resized. If you are already using
the value 1 in the component's Tag property, you can change the default
to any other value by entering the new value in the GTSizer's IgnoreTag
property.
Q. Windows
Menu bar:
Does the windows menu bar resize?
A. No. The Windows
menu bar is governed only by Windows itself. This is native WinAPI
behavior--not Delphi. Menu bars will be smaller at higher resolutions
and larger at lower resolutions. This is also applicable to the form's
title bar.
Q. Glyphs:
If I have a speedbutton with a graphic image (glyph), will the image resize?
A. No. Icons
and glyphs are static in size and were not designed as resizeable.
Because the GTSizer does not typically change the native behavior of components,
it does not resize them. Keep this in mind, since the speedbutton
will resize. Shrinking a form can cause the static glyph to cover
or overlap the edges of the resized speedbutton and alter its three-dimensional
look.
Q. TCanvas
fonts:
Will GTSizer work with a routine which writes onto the TCanvas and that
changes font size repeatedly when writing onto the canvas?
A. Basically, it depends
on how your program is written. If what you are writing onto the
canvas is not an object, it is erased when resized. If what you are
writing onto the canvas is an object (in other words, has a memory location
or class declaration), it should resize.
When the GTSizer resizes
the fonts (whether shrinking or expanding), its reference point is taken
from the current font size. If you change the font after a resize
event, the next resize event will be based on the then current font size.
The GTSizer does not look for a specific font size but rather increments
up and down--so if the font size is too large to begin with, it may continue
to be too large--or vice versa.
Q. Resizing
components:
Does the GTSizer resize components as well as fonts?
A. Yes. The GTSizer
resizes all native Delphi resizeable components as well as their fonts
(unless specifically directed to ignore font resizing). It ignores
any non-visual components, since they are not resizeable. Be aware
that some components either have sizing limitations or may not be designed
as a resizeable component. It is best to use a TrueType font (i.e.
Arial, Times New Roman), rather than Delphi's default (MS Sans Serif),
because they have more point sizes and therefore have greater scaleability.
Q. Component
compression:
Controls on my forms appear smaller (squished) and blank space is on the
right and bottom of my form, but it worked fine before.
A. There are several
possible causes. The GTSizer takes a design time "snapshot" of the size
and placement of each visual component so it knows how to adjust them at
run time. If components appear shrunk in the upper left corner of
the form, it means the snapshot needs to be updated or changed. The two
most common occurences are as follows:
The unit was open, but
the form stayed closed: If you open the unit but not its associated
form, Delphi may override the form sizes GTSizer stores. To
avoid this from happening, we recommend that you always open the form when
you open its associated unit. Alternatively, you could leave all
units and forms open (if your project is small). You could also make
it a habit that before closing a form, set GTUpdate to true and close the
associated unit as well as the form.
The form size is changed
or components are added/deleted/moved: When the developer
increases the form's size and adds or moves components into the new form
space, GTSizer needs to update its design time "snapshot". Select
the GTSizer's GTUpdate property from the object inspector, set it True,
then click OK when GTSizer prompts it has updated.
If setting GTUpdate to True
does not correct the problem, see if one of the following situations applies
to your forms.
Using Visible Controls
hidden from view: First, keep in mind that the GTSizer looks for the
placement of ALL visual controls, whether you see them on your form at
design time or not. Developers may have an errant control lurking on their
form or may intentionally be hiding visible controls in the periphery.
For example, say you initially
have a form size with a width of 600. You place an edit label at 550, but
since you won’t use it until run time when you change the size of the form,
you shrink the width of your form to 500. The control is now hidden in
the form's periphery. The GTSizer knows that you have an edit label at
550 and will force the form size larger to accommodate it. So, do not mix
visual and non-visual controls in the form’s periphery.
Position visual controls
where you want them to appear on the form. You can then turn its visible
property on or off. Or, if you want certain controls to appear at run time,
try adding them dynamically, after the form has been opened--and be sure
to use the GTSizer's DynamicControls method. If you’re unsure how to dynamically
add controls, look at our example, GTRTMDem in the GTDemo directory.
Using Form Inheritance:The
problem will appear on descendant forms. When creating an ancestor form,
be sure to bring the right and bottom sides of your form as close as possible
to the components on the form. You can widen and lengthen the descendant
form to accommodate the new controls introduced there. Alternatively, you
can set whatever size you want your ancestor form to be, drop a panel on
your ancestor form, set the panel’s visible property to false, and set
its align property to alBottom.
Using a Scrollbox: If
you are using a container component such as a scrollbox, it may be necessary
to scroll to the rightmost or bottom-most of the component, set GTUpdate
to True, then scroll back to the leftmost or topmost before compiling.
This is only in cases where the container would normally exceed the bounds
of the form if all its contents were
Using a large image:
An image which is wider or longer than the form size may cause this problem
when the image's stretch property is False. The image component may
also inadvertently extend beyond the form's boundaries.
Q. Align
property:
You recommend setting the align property to None. Must I always do
this--regardless?
A: If your form and
components look fine with your current align settings, don't worry about
it. This recommendation is primarily there for those instances where
the align setting may cause one control to overlap other controls.
Q. Text
alignment:
Does GTSizer support left, right, and center alignments for labels?
A. The GTSizer supports
left and right text alignments for labels. Center alignment (taCenter)
is not supported. However, there is a workaround. Use a panel
and shrink it to the desired size. Enter the text you wish to appear
in the Panel's Caption property. Change the BevelOuter and BevelInner
Properties to bvNone. The panel will look like a standard label and
automatically centers the text. |
|
|
|
COMPONENTS
- CUSTOM/3rd PARTY COMPATIBILITY
|
| Q. 3rd
party compatibility:
Are most 3rd party components compatible with GTSizer?
A: Most resizeable
visual components which inherit from TControl should be compatible.
Note that some vendors have limited the resizing capability of their controls.
Also, some may have descended from components which are not resizeable.
It may be necessary to add the control in the GTDBSizr if the GTSizer does
not recognize the component properly to resize it.
You should check with your vendor to see if there are any sizing limitations.
If it is a container component, the Form must be the owner of the contents
in order to properly resize the container as well as its contents.
Q. Resizing
non-native component:
I have a custom component that doesn't seem to be resizing or appearing
properly
A. Some components
descend from Delphi components which are not resizeable. In those
instances, the GTSizer will not be able to override the static behavior.
Also, some vendors have limited or altered the resizing capability of their
controls.
If it is a container component,
the Form must be the owner of the contents in order to properly resize
the contents.
It may be necessary to add
the control to the GTDBSizr.PAS file and use the GTDBSizr (or create your
own file if you don’t use the BDE). Follow the example in the GTDBSizr.PAS
file for YourControl’s-class, replacing YourControl’s-class with
the name of the component you are using. Copy this piece of code as many
times as you need for each control. Compile the GTDBSizr code. Then
recompile your component library so that the changes are incorporated (or
remove the GTSizer from the component palette and add the GTSizer back
to the component palette--the component library will recompile)
Q. Resizing
non-native component font:
The font is not resizing correctly in my component (not a native Delphi
component)
If the font is not resizing
correctly then you will need to add the control to
the GTDBSizr.PAS file and use the GTDBSizr (or create your own file if
you don’t use the BDE). Follow the example in the
GTDBSizr.PAS file for YourControl’s-class, replacing YourControl’s-class
with the name of the control you are using. Copy this piece ofcode as many
times as you need to for each control. (Keep in mind thatif the control
does not have a font property, the GTSizer won’t be able to resize the
font.)
Q. Resizing
non-native component grid/table:
I have a 3rd party component where the font and component itself resizes
but columns/rows don’t resize with it.
A. The control you
are using probably inherits from or is similar to Delphi’sstring grid.
Delphi’s string grid was not built to resize; it allows only thefonts to
be resized--not columns and rows.
Q. TOvcNotebook:
Orpheus Notebook width doesn't change--is there a workaround?
A. Sizing limitations
may be present in many third party components. This is one
specific example. Apparently the vendor has limited the resizing capability
of their component. Although the GTSizer cannot change theselimitations,
a work around for this situation is as follows: drop
a panel on your form then place the TOvcNotebook on the panel
and set the align property to alClient. This forces the notebook
to resize with the panel.
Q. DBLookupComboBox
sizing:
My third party xxxDBLookupComboBox grows too large when resized.
How can I change it?
This is a problem inherent
with the DBLookupCombo. We compensated for this behavior in the native
Delphi DBLookupComboBox, but are unable to do so for every third party
component which inherits from this control. We can customize the GTSizer
for you if necessary, for a small fee.
Q. DBExtender:
I'm using a control called DBExtender and it shows up larger at run time.
I know there is a size limit, i.e. it can only shrink so far. Is
there anything I can do?
A: Try this.
If the increase in height is about 50% more than what you would like, then
this line of code may have an effect: DBExtender1.Height := DBExtender.Height
*0.5; Put it in the GTOnResize event of the GTForm.
In Delphi 4 and 5 you can also use the component's contrain properties
to set maximum height/width. |
|
FEATURES
AND PROPERTIES
|
| Q. Dynamic
Controls:
What does the DynamicControls feature do and when should I use it?
A: Keep in mind that
the GTSizer remembers the form size and component placements from design
time. After the forms are displayed, the GTSizer needs to know when
components are programmatically deleted, added, moved, or whose size
increases or decreases at run time, or when a label's text changes.
The DynamicControls method is what does this. It is also used when
the form's size is programmatically changed without resizing the components,
after the form is displayed. For example, if you change the size
of the controls at run time, invoke the Dynamic Controls method to inform
the GTSizer that there have been changes to the sizes of the controls within
the form since design time. It is not necessary to use DynamicControls
when you set a component's visible property to true or false. You might
want to take a look at our example in the GTRTMDEM directory.
For runtime changes to controls,
you must first invoke FormReset to reset the form to load time size, then
change the control's size, position, add or delete, or change the text,
then call the DynamicControls method.
begin
GTForm1.FormReset;
{resize, create, delete, move, change text of controls as desired}
GTForm1.DynamicControls;
end;
After the form has been displayed,
to programmatically change the size of the form without resizing the components,
first set Enabled to False, do your size chnages, then call Dynamic Controls,
and then set Enabled to True.
begin
GTForm1.FormReset;
GTForm1.Enabled
:= False;
{change
the size of the form and perhaps any other control changes}
GTForm1.Dynamic
Controls;
GTForm1.Enabled
:= True;
end;
Q. GTDBForm
vs GTForm:
What is the difference between GTDBForm and GTForm?
A: The GTForm can be
used on any form, including those with database access.
The GTDBSizr (GTDBForm) has
two purposes. (1) It will allow sizing of the title font on a DBGrid.
and (2) it allows you to add components which the GTSizer doesn't recognize.
The standard GTSizer (GTForm)
does not resize the title font in a grid because we needed to create a
generic version which would not require the BDE. To access the title
font of a DBGrid, the DBGrid must be specifically referenced. Anytime
Delphi sees "DB", it looks for the BDE.
If you have a resizeable
third party component or your own custom resizeable component and the GTSizer
does not appear to be resizing the fonts and/or the component properly,
you can add it to the GTDBSizr.PAS file. We included a couple of
examples (in the GTDBSizr.PAS file using a Woll2Woll DBGrid and another
for any other control). Follow the example in the GTDBSizr.PAS file for
YourControl’s-class, replacing YourControl’s-class with the name
of the component you are using. Copy this piece of code as many times as
you need for each control. Compile the GTDBSizr code. Then recompile
your component library so that the changes are incorporated (or remove
the GTSizer from the component palette and add the GTSizer back to the
component palette--the component library will recompile).
Note that if you do not use
the BDE, you can create your own file to substitute for the GTDBSizr or
comment out the portions of code in the GTDBSizr which refer to "DB".
If you do create your own file, follow the example of the declaration for
the GTDBForm--and avoid any reference to "DB" in your new file. Be
sure to subsitute your file name for GTDBForm in the GTSizer's registration
code file (GT16reg.pas or GT32reg.pas). |
|
FORM SIZING
|
| Q. Fixed
size forms:
I want my form to come up using the same percentage of the screen no matter
what resolution is employed and also solve the small font/ large font problem.
Can GTSizer do that?
A: Yes, by setting
the GTSizer's SameSize property to True and setting the Form's Scaled property
to False. When SameSize is set to False (the default), the form is
run proportionate to the resolution. Forms and windows are usually
displayed at different resolutions proportionate to the new resolution.
Run any application say, Word for Windows, or Delphi, or even Windows itself
at different resolutions the forms appear smaller at higher resolutions
and larger at lower resolutions. With the SameSize property set to
True, the GTSizer fights Windows default behavior so that the form fills
approximately the same amount of screen space whether you are running at
1024x768 or 640x480. Keep in mind that the GTSizer cannot override
Windows control of form menu bars and title bars, so they will run proportionate
to the run time resolution.
Q. Filling
screen:
I want my form to fill the user's screen, regardless of resolution.
Can the GTSizer do that?
A: Yes. There
are two ways to accomplish this. (1) Use GTSizer's SameSize property
or (2) use the form's WindowState property. To use the SameSize property,
fill your screen with your form (don't maximize) at design time.
Set the SameSize property to True. To use the form's WindowState
Property, leave the form at normal size at design time and programmatically
set the WindowState property to wsMaximized. (GTSizer works better
when WindowState= wsMaximized is not set in the object inspector.)
The controls will be resized to fill the spaces created during maximize.
Set the form's position property to poDefault or poDefined. Do not
use poScreenCenter. Note that this second method will not properly
work on 640x480 if your form's design time size is larger than 640x480.
Q. Not
maximizing properly:
I am using wsMaximized to fill the user's screen, but it does not quite
fill the screen. ORWhen
I select the form's Maximize button, the form does not fill the screen.
A form that is disproportionately
wide will not fill the screen unless GTSizer's SizeBalancing is disabled.
The SizeBalancing feature increases the height by the same factor as the
width. You can either make your form's height/width ratio more proportionate,
or disable SizeBalancing when the form is Maximized.
To turn off SizeBalancing,
attach this code to your GTForm's Event:
GTForm1.SizeBalancing
:= False;
Q. Extra
space:
Controls appear fine, but there is space to the right and/or bottom of
my form How do I get rid of it?
A. There are a few
possible causes for this:
(1) Controls extend beyond the form’s length or width. Check
the width and length of your form as opposed to the position ofyour form.
If your control extends even one pixel beyond the
form’s size, GTSizer, will adjust the sizing so that all controls are completelyvisible--hence
the gap. Once you have repositioned the controls, it
should be fine.
(2) Using GTSize32 v. 1.0
with Delphi 2 (internet enabled version) In this version of Delphi 2, Borland
made numerous changes to the form. This affected the display size of the
form at run time. The GTSize32 v 1.x patch counteracts this behavior.
(3) If you are using a native
Delphi control within a native Delphi control that uses scrollbars (i.e.
a scroll box),
|
|
FONTS
|
| Q. Small
vs Large fonts:
Does the GTSizer handle scaling fonts when switching from small font to
large font environment?
A: Yes. To see
a quick demonstration for yourself, be sure to compile our sample applications
(included in the trial version too) at 800*600 small font then run them
on 640/480 to 1280/1024--and everything in between--large font or small
font.
Q. Fonts
supported:
Can GTSizer handle all fonts styles and sizes? Will the GTSizer work at
all with non-TrueType fonts like MS Sans Serif?
A. We have not tried
fonts other than those found with Delphi, but if your fonts are scalable
it should be fine with the GTSizer. All the GTSizes does is resize
the fonts. It does nothing else to the fonts. The only requirement
is that the fonts must be called 'Font'. Although the GTSizer will
resize non-TrueType fonts such as MSSans Serif (Delphi's default font),
we do not recommend using them. This is because they have fewer point
sizes and do not scale as well as TrueType fonts.
Q. Fonts
too small:
I'm developing at 800x600 using SameSize, but at 640x480 my fonts are too
hard to read.
A. Remember that when
SameSize is set to true, the GTSizer shrinks the form and components to
fit at the lower resolutions. This means that it must user a lower
font point size also. Even without GTSizer fonts will not appear
as crisp at 640x480 as they do at 800x600 because there are fewer pixels
per inch. Therefore, when you develop at 800x600 (or higher) we do
not recommend using a font point size any smaller than 10. 12 point
is probably better.
Q. Font
sizing: My fonts do not seem to be resizing correctly
First, be sure that your
fonts are TrueType fonts
(i.e. Arial or Times New Roman). Is the component's ParentFont property
set to True? If so, GTSizer's SameSize must also be set to True.
If you don’t want to use the SameSize property, then you cannot use ParentFont
and you must set the fonts individually on your form. (Keepin mind that
you can select all components with a font property and setthe font name
and size for all of them simultaneously.)
Are you using a Third Party
component or custom component? If so, you may need to add your component
to the GTDBSizr.pas file.
If the font you are using is a TrueType font and is not resizing correctly
then you will need to add the control to the GTDBSizr.PAS file and use
the GTDBSizr (or create your own file if you don’t use the BDE).
Follow the example in the GTDBSizr.PAS file for YourControl’s-class,
replacing YourControl’s-class with the name of the control you areusing.
Copy this piece of code as many times as you need for eachcontrol. (Keep
in mind that if the control does not have a font property,the GTSizer won’t
be able to resize the font.) |
|
PRE-SALES
QUESTIONS
|
| Q. Distributors:
Do you have international distributors whom I can purchase the GTSizer
from?
A: At this time, GenoTechs
is a sole source for the GTSizer and does not have any agreements with
international distributors for the GTSizer. There are, however, numerous
distributors who purchase the GTSizer on request from their clients.
GTSizer is also available through Programmers
Paradise.
Q. Purchase
orders:
Do you accept government or corporate purchase orders?
A: We accept US purchase
orders for quantity orders of six or more. Otherwise, payment can
be made via credit card (Visa, MasterCard, American Express, Diners Club,
or JCB), check drawn on a US bank, international money order, or electronic
funds transfer.
Q. Registered
version:
Do you have a registration number that unlocks the trial version or do
I need new files?
A. When your order
is placed, we ship new files which need to be copied to your directory.
Any trial version files should be removed from your computer before installing
the registered version.
Q. Source:
Is source code included/available?
A: Code is included
with the GTSizer only for giving the developer the ability to add third
party controls or custom controls which the GTSizer does not recognize.
Source code for our sample applications are also included. However,
the core source code for the GTSizer is not included. |
|
RESOLUTION
|
| Q. Form
cuts off:
I design my screen win95 800/600 small font. When I switch
to 640/480 the screen is much too big and cuts off. How can I get
it to display better?
The GTSizer's default resolution
feature is *relative* to the resolution or as we say, proportionate to
the resolution. If a form is developed in a high resolution
and run in a lower resolution, it will naturally appear larger because
there are fewer pixels per inch. This is normal behavior for any
application. The GTSizer does not maintain the same form size
regardless of the resolution, unless the GTSizer's SameSize property is
set to True.
Therefore, if the form is
large to begin with, it will be even larger when run at a lower resolution.
If you don't want to use the SameSize property, be sure your form's design
height and width do not exceed 640x480.
Q.Image
mapping:
I'm using a background image which requires that the components stay fixed
in their positions, regardless of resolution. When I change to large
fonts, it really gets thrown off. How can I make it work?
A. If your image can
be resized without compromising its appearance, set the Stretch property
of TImage to True. If your image cannot be resized, leave the Stretch
property to False and set the GTSizer's GTDisplayHeight and GTDisplayWidth
to be the same as your form's ClientHeight and ClientWidth. Be sure
to set the form's Scaled property to False in either case.
|
|
SYSTEM INFO
|
| Q. Overhead:
Will GTSizer add any overhead to my application?
A: The GTSizer itself
is less than 40k. However, it does not add that much per form. Because
of Borland's smart compiler and object orientation, one copy of the class
structure is used for each application. Other copies (instances or
objects) of the class use the same source.
Q. List
Index Error:
What could be causing a List Index Out of Bounds" message?
A. It is likely
that you are adding or changing controls at runtime that werenot present
at design time. You need to use the DynamicControls method
to ensure that the GTSizer captures these changes.
A. Unique to form inheritance,
when a GTSizer icon is repositioned on a descendant form, it can cause
a list index out of bounds error. You must either leave the GTSizer
in its original position on the form or before compiling, right click the
GTForm icon and select "Revert to Inherited" from the popup menu.
Q. Focus
Error:
What could be causing a "Cannot Focus a Disabled or Invisible Window" message?
A. Because the GTSizer
must look at each and every component of the form in order to resize, it
can sometimes bring out an issue like "cannot focus a disabled or invisible
control" that Delphi would otherwise ignore. This problem can also
occur without the GTSizer on tabbed notebooks. So, first test the form
without the GTSizer to see if the error still occurs. If the problem only
occurs when the GTSizer is on the form, ensure that something visible always
has the focus. In other words, before setting focus to a control,
be sure it is visible first. Note that tab stop must be set
to true for TPageControl. Our versions since January 1998 rarely
have this problem. |
|
VERSION COMPATIBILITY
|
| Q. Is
the GTSizer compatible for all versions of Delphi and/or C++Builder?
A. The GTSizer is version
and product dependent, so you cannot use the same DCU for all versions of
Delphi and/or C++Builder. However, when you purchase one GTSize32
at full price, any other GTSize32 version is only $124.95 (+ s/h).
Q. Porting:
How can I use the same source code between the Delphi 16 bit and 32 bit
versions of GTSizer?
A: To compile an application
using GTSizer in both 16 and 32 bit version of Delphi, do this to the uses
clause of a form. (Note: you can save the form as a Template
and use it throughout your application.)
{$IFDEF WIN32} GTSize32,
Windows, {$ELSE} GTSize16, WinTypes, WinProcs,
{$ENDIF}
|
|
WINDOWS TASKBAR
|
| Q. TaskBar:
How does the GTSizer deal with the Windows TaskBar?
A: Windows--not GTSizer--controls
how the taskbar behaves with an application. It is a matter of which
preferences the user selects for the TaskBar.
If the user selects the TaskBar
option "Always on Top" (from the Start | Settings | TaskBar menu) the taskbar
will never be hidden when the form is maximized.
If the user also has the
"Auto hide" selection checked, the application can maximize and fill the
space where the taskbar would normally be, but once the cursor is positioned
where the taskbar is hiding, the taskbar will
make itself visible. However,
while visible, the taskbar can cover the that portion of the application. |
|