I've been looking for a solution that will allow the user to
click on a piece of text as if it were a button or link. The
problem is that I can't seem to get the spacing and sizing correct.
My first try was using a LinkButton object, which does exactly as I
want it to except I can't figure out how to get rid of the excess
padding around the button. There's a lot of space taking up but the
padding and hover effect, so I was wondering if there was a way to
shrink those so that I can get more linkbuttons closer together.
My next try was to use a regular label as <mx:Label
buttonMode="true" mouseChildren="false" useHandCursor="true"
text="1"/>, but the problem is even though this gets rid of the
hover effect, it still has the same padding and click-target area
as a linkbutton or regular button. I tried styling a regular
mx:Button element to get rid of the "button-ish" look and found the
My final desperate attempt was to look into the programmatic
skinning of components. I created a custom skin that extends
mx.skins.halo.LinkButtonSkin and I overrode the measuredWidth and
measuredHeight getters, using the code from the livedocs
I then applied this style to the upStyle, downStyle,
hoverStyle, and disabledStyle of my LinkButton element, but it
didn't do anything. The linkbutton's size and click-target area
were the same as the default.