Board index » delphi » Bizarre TToolbar problem

Bizarre TToolbar problem

Hi.

This is a weird one. I have a Delphi 3 application with two forms, a
main form loaded by the .DPR file, and another form loaded by my code.
Each has its own TToolbar, which currently happen to hold the same
combination of buttons and separators.

Here's the weird thing: when testing the application at different screen
settings (it's designed to autosize to fill the screen automatically) I
discovered that at one screen setting (800 by 600 and large fonts) the
display of the Toolbar on the code-loaded form gets screwed up. (The
Toolbar on the other form works fine.) I've experimented by changing the
buttons on the Toolbar and found that if there are separators, the
buttons sometimes become invisible (although if you click where the
buttons should be, they worked!), and if there are no separators the
order of the buttons gets screwed up. This strange behaviour only occurs
at this one screen setting. Other combinations of resolution and
small/large font size work fine.

In the end I gave up and tried creating the buttons at run-time, so they
are created AFTER the form is scaled to suit the screen settings. This
now works fine, but I'm curious if anyone else has encountered this
problem. Was there was something I could have done to save five hours on
a Sunday?

--
Gary Jones (Remove SSPPAAMMBLOCK from e-mail address)
PGP public keys available from servers
RSA Key ID: 0x6AFBEAA1
DSS/Diffie-Hellman Key ID: 0x11EAE903

 

Re:Bizarre TToolbar problem


I can't realy tell you of a fix in Delphi, but the large font settings seems
to give problems in many different area. Someone recently asked me to come
and look if I can get Lotus Word Pro to stop crashing (my first response was
"Replace it with something better"). The problem seemed unrelated to any of
the usual driver conflicts or faulty settings, but went away as soon as I
changed the screen from large fonts to normal. Before that, I once had
Delphi apps crashing or sizing out of proportion using this setting.
Quote
Gary Jones wrote in message <04auSDAW0CN2E...@bohr.demon.co.uk>...
>I discovered that at one screen setting (800 by 600 and large fonts) the
>display of the Toolbar on the code-loaded form gets screwed up.
>This
>now works fine, but I'm curious if anyone else has encountered this
>problem. Was there was something I could have done to save five hours on
>a Sunday?

Other Threads