Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread TextManager replacement?
Thu, May 21 2015 12:05 PMPermanent Link

Doug B

In EWB 1 I was using the TextManager to get the text width/height.

Is there a similar class in EWB 2?

Thanks,
Doug
Thu, May 21 2015 12:35 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Doug,

<< In EWB 1 I was using the TextManager to get the text width/height.

Is there a similar class in EWB 2? >>

Yes, you want these methods from the global InterfaceManager instance:

        function ContentWidth(AFont: TFont;
                              const AContent: String;
                              AAlignment: TContentAlignment=caLeft;
                              AWrap: Boolean=False;
                              AWrapWidth: Integer=0): Integer;

        function ContentHeight(AFont: TFont;
                               const AContent: String;
                               AAlignment: TContentAlignment=caLeft;
                               AWrap: Boolean=False;
                               AWrapWidth: Integer=0): Integer;

Tim Young
Elevate Software
www.elevatesoft.com
Image