[Gambas-user] Can gambas figure out dimensions for objects?

Jaap Cramer jaap_cramer at ...67...
Wed Jun 4 16:13:34 CEST 2008


Jou can use a textlabel with the .adjust command
It resizes the textlabel to a height where its content fits. I wrote
function to calculate the desired height for textarea's by putting its
contents and font-size in a textlabel; save the height and make it the
height of the aera.

I hope it helps...

Jaap

On Wed, 2008-06-04 at 09:02 -0500, M0E Lnx wrote:
> Up to now, I've never needed this feature, so I never tried this. But
> here is the situation now.
> 
> I need to find out if it is possible at all for gambas to determine
> the size of an object (button and textlabel mostly), based on the
> object's .text property
> 
> So why do you need this you ask?
> I'm trying to offer room for translation of a project of mine. So the
> hard coded text on the objects will fit just right, But a translated
> version of an object's text, may be shorter or longer, depending on
> the target language.
> 
> Does anyone have any idea how to accomplish such a task?
> 
> Thanks
> 
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 






More information about the User mailing list