Setting button width with fx:Style - actionscript-3

I have 4 buttons, all of them have the same width.
<s:Button id="btn1" width="{btnWidth}" />
<s:Button id="btn2" width="{btnWidth}" />
<s:Button id="btn3" width="{btnWidth}" />
<s:Button id="btn4" width="{btnWidth}" />
Is it possible to set their width with Style, something like this:
s|Button{
width: btnWidth;
}
I tried it, but auto-complete isn't working, which leads me to think that there's something wrong with the syntax. Basically my goal is to not have the width property set specifically for all 4.

It won't work out of the box because width is a property of button, not a style. You can only specify styles in your stylesheet.
However, what you can do is extending Button and add a style that controls the width of your button.

Related

How to change label length on AS3 checkbox?

I have a checkbox label that needs to be about 50 characters long, but it's being truncated at 13 characters.
How do I code it to allow longer text in the label please?
Thank you
You can follow two different ways:
The first: Try in your checkBox (s: or mx:) to increase the width property
<s:CheckBox id="myChk" width="100" />
<mx:CheckBox id="myChk" width="100" />
The second: You can wrap your checkbox in a FormItem (s: or mx:) so, you can manage the width of FormItem and your checkbox manage only the tick select.
<s:FormItem id="myItem" label="AAAAAAAAAAAAAAAAAAAAAAAAAAAAA">
<s:CheckBox id="myChk" />
</s:FormItem>

mx:TextArea vertical scroll bar disabled

I have a TextArea component as follows:
<mx:TextArea
id="textArea"
width="100%"
height="100%"
editable="false"
verticalScrollPolicy="on"
/>
My issue is that I populate the TextArea with a huge amount of text that needs to be scrolled through. The vertical scrollbar exists, but is disabled. Even though it is disabled the user can scroll using the mouse scroll.
Note: If I change the text later the scrollbar reenables.
The fix turned out simply using the spark component instead of mx component:
<s:TextArea
id="textArea"
width="100%"
height="100%"
editable="false"/>

How To Add HTML Code To Asp Button's Text Attribute

I'm trying to add a symbol for a button's text but this shows no text. What's the correct way?
The symbol is an arrow - here.
<asp:button id="btnAdd" runat="server" class="next"/>
CSS:
.next
{
content = ❯
width:50px;
}
When I say Text='❯', it shows a '?' symbol
Try this one:
<asp:button id="btnAdd" runat="server" class="next" Text="❯"/>
It is easiest to set the Text attribute of the asp:button
<asp:button Text="→" .../>
EDIT:
the entity you are using doesn't render, try this one: → →
If you really need a css solution:
content is only a valid rule when using the :before or :after pseudo-selectors, note: you're not really setting the content of the button, you're adding a text element after the button! Also, if using content, you need to use unicode
.next:after{
content: "\25BA";
}
http://css-tricks.com/css-content/
<input type="submit" value="➙">
In ASP.NET
<asp:Button ID="btnLogin" Text="Login ➙" runat="server" />

Besides button, submit and <a></a>, is there other way that can make text clickable?

Besides <input type="button" value="Click me" />, <input type="submit" value="Click me" />, <a>Click me</a>, is there another way that can make "Click me" clickable?
With Javascript and CSS, you can make almost everything click-able.
<img src="photo-thumbnail.jpg" onclick="popup_image('photo.jpg');" style="cursor:pointer;" alt="" />
Setting cursor:pointer will make an element look clickable.
But again, that will only work if Javascript is enabled.
You can use Javascript:
<span onclick="...">Eat me</a>
This of course only provides the reaction to the click, if you want to make it look clickable also you have to add some styling.
By clickable do you mean something other than that it causes JavaScript onClick events to fire? Any DOM component should do that. If you want to change the cursor to indicate that something will happen when text is clicked, you can do that with CSS.

Hidden radio button but box around it in ie8

I have style my radio buttons with a background image, basically what i have done is
<input type="radio" id="btn" name="btn" style="opacity: 0;filter: alpha(opacity = 0);position:absolute;">
<label for="btn">My Text</label> <!--- added styles to it --->
with this i get output something like this
Image1 that shows how the display should be: http://i39.tinypic.com/2vcyidg.png
It works fine in every browser except ie8, in ie8 it shows a dotted box around hidden buttons when a label is selected
Image2 shows the problems in ie8: http://i39.tinypic.com/j8l635.png
I cant choose the property display:none; as in IE browsers it disables the radio buttons so i have to hide it.
How can i hide that dotted box in ie8?
Thank You.
Regards,
Shishant Todi.
Is there a reason why you're not using <input type="hidden" />?
if you can use javascript:
<input onfocus="this.blur()" type="radio" id="btn" name="btn" style="opacity: 0;filter: alpha(opacity = 0);position:absolute;" />
I had a similar issue where my radio buttons and checkboxes were showing borders, but only in IE. In my case, this was a css issue where these inputs were being treated the same as text inputs. I simply defined a new class in the stylesheet and specified a border of zero px.