[Chameleon] textbutton label vertical align

Ken-ichi kueda at wso.williams.edu
Mon Oct 18 16:36:47 EDT 2004


Hi Paul.  I'm running Gentoo, PHP 4.3.9, GD 2.0.26, FreeType 2.1.5-r1.  
You can see my phpinfo at 
http://fisher.cnr.berkeley.edu/~kueda/phpinfo_mapscript.phtml.  <nudge> 
didn't work but <textbuttonnudge> did.  Thanks for alerting me to the 
existence of such a tag.   The app is at 
http://fisher.cnr.berkeley.edu/vtm/data/mapbrowse/.  It's still a work 
in progress, so don't be surprised if there are a few formatting 
problems.  I set the textbuttonnudge back to 0 so you can see what it's 
doing.

-Ken-ichi

Paul Spencer wrote:

> Ken-ichi,
>
> try adding <nudge value="-1"/> to your sharedresource.  The value of 
> this parameter is the amount to move the label vertically, you will 
> have to experiment with the amount.
>
> Note that the labels should be centered by default.  The code does go 
> to some pains to figure out the height of the text and center it.  If 
> it is not getting centered, then something is wrong with the code or 
> with PHP/GD/FreeType reporting the height of the text.  Since labels 
> are normally centered just fine, I suspect a PHP/GD/FreeType reporting 
> issue.
>
> Can you provide details on your platform(OS), PHP version, GD version 
> and FreeType version please?  Also, is your app web-accessible so I 
> can take a look at it?  Also a phpinfo page would be useful.
>
> Cheers,
>
> Paul
>
> Ken-ichi wrote:
>
>> Hi all.  Is there a way to control the vertical alignment of the 
>> label within a textbutton?  All of my labels seem to align to the top 
>> of the button, while the icon aligns to the middle, which makes the 
>> button look a little weird.
>>
>> Thanks.
>>
>> -Ken-ichi
>> _______________________________________________
>> Chameleon mailing list
>> Chameleon at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/chameleon
>>



More information about the Chameleon mailing list