Subj : Re: Size problems with TTextGadget To : borland.public.cpp.borlandcpp From : Mohsen Date : Wed Apr 27 2005 12:34 pm "Alan Jones" wrote: >I'm using OWL and BC++ 5.02. > >I use TText Gadget to insert items in the status bar at the bottom of the >screen. The documentation says that the fourth parameter specifies the >number of characters: > >numChars > >Specifies the number of characters to be displayed in the gadget and >determines gadget's width. To calculate the required gadget width, the >gadget multiplies the number of characters by the maximum character width of >the current font. The height of the gadget is based on the maximum character >height of the current font, plus space for the margin and border. > >However, I find I have to set the numChars to 6 to hold a message that is 11 >characters wide. This is on Windows NT. When I run the same program on >Windows XP, the space for this Gadget is much wider. So much wider that >most of my gadgets are pushed right off the screen. > >I have tried changing the current font but it seems to have no effect. > >Alan > > I've also faced the same problem, I don't know the reason, but a look at the example shipped with borland might help as it properly handles the text sizes: BC5\EXAMPLES\OWL\APPS\BLAZER Mohsen .