On Thu, 10 Feb 2005 15:15:47 -0500 (EST) dan sinclair <[EMAIL PROTECTED]> (Bbabbled: (B (B> Hello, (B> (B> I've been playing with the textblock in relation to EWL a bit lately and have (Brun into an issue. In the textblock, until you evas_object_resize, the width is (Balways 0 (I consistently seem to get height 3 back for some reason). (B (Bthats due to it accounting for space for a double-underline if it were to appear (Bon the last line - it doesn't remove the extra if there is no underline on the (Blast line of the textblock :) that 3 would be a bug. what you want is the call (Bthat gets the native size (how big it would be without any wrapping/avoiding of (Bobstacles etc.) but that call isnt done yet (not the FIXME's in the code) :) (B (Banyway - the reason for this is you are getting the formatted size. that is the (Bsize post-formatting which relies on the object width to know when to line wrap (Band thus cannot compute a size until it at least has a width :) if the width is (B0 at the start.. it cant exactly fit much text into a 0 width object... (Bcurrently thats another fixme.. what if a word or char doesnt even fit in the (Bobject width. currently it blindly skips on when that happens... (B (B> Now, the problem with EWL is that it wants to get the size of the formatted (Bregion and then resize/set its preferred size to that size. Now, Nathan has a (Bworkaround: (B> (B> <RbdPngn> ok, so here's teh work around to discover preferred size (B> <RbdPngn> fill in your text to the textblock (B> <RbdPngn> resize the object to a starting size, probably start small (B> <RbdPngn> resize and query the y position of the end of the text (B> <RbdPngn> repeat until y doesn't change (B (Bthats evil! :) how about waiting till the native size format is set. :) (B (B> But, I don't think this will work for scrollpane. (B (Bif its text WITHIN the scrollpane then you only really care about its height, so (Bmake the width the scrollpane internal width and u can query the formatted (Bheight to then resize to that height and set scrollbar sizes accordingly. (B (B> Is there a way we could say, what is the formatted size of this (Bevas_object_textblock using the longest line as the evas object width? (B (Byes.. the native size get call - which is... not done yet :) (B (B> (The test program I was using is http://www.everburning.com/tmp/e.c) (B> (B> dan (B> (B> (B> (B> (B> (B> (B> (B> ------------------------------------------------------- (B> SF email is sponsored by - The IT Product Guide (B> Read honest & candid reviews on hundreds of IT Products from real users. (B> Discover which products truly live up to the hype. Start reading now. (B> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click (B> _______________________________________________ (B> enlightenment-devel mailing list (B> [email protected] (B> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel (B> (B (B (B-- (B------------- Codito, ergo sum - "I code, therefore I am" -------------- (BThe Rasterman (Carsten Haitzler) [EMAIL PROTECTED] $BMg9%B?(B [EMAIL PROTECTED] (BTokyo, Japan ($BEl5~(B $BF|K\(B) (B (B (B------------------------------------------------------- (BSF email is sponsored by - The IT Product Guide (BRead honest & candid reviews on hundreds of IT Products from real users. (BDiscover which products truly live up to the hype. Start reading now. (Bhttp://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click (B_______________________________________________ (Benlightenment-devel mailing list ([email protected] (Bhttps://lists.sourceforge.net/lists/listinfo/enlightenment-devel
