Hi Bob,
Sorry we didn't respond to this
earlier. I only have some answers for you right now.
1)
certain core properties
are not available as styles due to performance limitations. Those are x,
y, width and height. So that's why they're having no effect
on your app.
2)
For the Link background
color, perhaps you need to change LinkBar to Link? I haven't tested
this, but I think the style is going to come from there.
3)
I haven't tested
this recently, I think your relative binding should work but others on the team
thought it might not. Maybe if the styles are worked out we'll be
able to see more.
So see how this goes and let us know if it
becomes a little more predictable.
Matt
-----Original Message-----
From: bobpardoe1959
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 05, 2004
12:17 AM
To: [email protected]
Subject: [flexcoders] Re: mxml
components not honoring external css styles ?
When you run this lot, you will see all sorts of
strange things.
The HaysLiteral works as expected. The Hays Combo
and TextBox both
have strange behavious and not looking at the
stylesheeet.
Try clicking on the linkbar tab called vbox
container.
Another issue is that the linkbar is not picking
up the selection
colour, it always stays the same i.e. light grey,
that is impossible
to see.
OK here are the 5 files :
1) MyStyleSheet.css
global {
font-family:"Arial";
font-size:11px;
color:#0E1D2C;
header-colors:#8BC0E7,#8BC0E7;
footer-colors:#8BC0E7,#8BC0E7;
corner-radius:4;
}
Application {
themeColor:haloBlue;
backgroundImage:"images/institutional.swf";
backgroundSize:"100%";
backgroundColor:#23476A;
}
/*
global
{
fontFamily :
"arial";
fontSize :
"11";
}
.Plain
{
color: #996633;
themeColor :
#CCCC66;
footerColors :
#CCCC66, #FFCC00;
headerColors :
#FFCC00, #CCCC66;
}
*/
Canvas
{
backgroundColor :
#CCCC33 ;
backgroundSize:"100%";
}
DateChooser
{
headerColor :
#CCCC66;
}
Application
{
marginLeft: 2px;
marginRight: 2px;
marginTop: 2px;
marginBottom: 2px;
}
LinkBar
{
selectionColor :
#FFFFFF;
backgroundColor:
#CCCCFF;
}
ViewStack
{
backgroundColor:
#CCCCFF;
}
HDividedBox
{
dividerColor: blue;
}
ControlBar
{
backgroundColor :
#CCCCCC;
}
Form
{
indicatorGap : 10;
verticalGap: 2;
marginLeft: 10px;
marginRight: 10px;
marginTop: 10px;
marginBottom: 10px;
}
.LocalMenu
{
horizontalGap: 3;
verticalGap: 1;
marginTop: 5;
marginBottom: 5;
marginLeft: 5;
}
.HaysLiteral
{
color: Blue;
}
.HaysLiteralData
{
fontWeight: bold;
color: Black;
}
.HaysLiteralVBox
{
verticalGap: 1;
marginLeft: 5px;
marginRight: 5px;
marginTop: 5px;
marginBottom: 5px;
}
.HaysLiteralCanvas
{
borderStyle: none;
backgroundColor :
#E9EFFC;
}
.HaysTextBox
{
height: 40;
borderStyle: solid;
}
.HaysTextBoxLiteral
{
color: Blue;
}
.HaysTextBoxDescription
{
fontWeight: bold;
color: Black;
}
.HaysTextBoxCanvas
{
borderStyle: none;
backgroundColor :
#E9EFFC;
height: 22;
}
.HaysComboBox
{
height: 40;
borderStyle: solid;
}
.HaysComboBoxLiteral
{
color: Blue;
}
.HaysComboBoxDescription
{
fontWeight: bold;
color: Black;
}
.HaysComboBoxCanvas
{
borderStyle: none;
backgroundColor :
#E9EFFC;
height: 42;
}
======================================
2) HaysLiteral.mxml
<?xml version="1.0"
encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.macromedia.com/2003/mxml"
borderStyle="none">
<mx:Script>
var text;
var data;
var alignPos=60;
</mx:Script>
<mx:Canvas
styleName="HaysLiteralCanvas">
<mx:Label styleName="HaysLiteral"
x="0" y="0"
text="{text}"/>
<mx:Label
styleName="HaysLiteralData" x="{alignPos}"
y="0" text="{data}"/>
</mx:Canvas>
</mx:HBox>
===============================================
3) HaysComboBox.mxml
<?xml version="1.0"
encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.macromedia.com/2003/mxml"
borderStyle="none">
<mx:Script>
var text;
var description;
var alignPos = 60;
var textSize = 100;
var descriptionSize = 120;
var name = "";
var textWidth = 75;
var maxChars = 5;
var editable = true;
</mx:Script>
<mx:Canvas
styleName="HaysComboBoxCanvas">
<mx:Label
styleName="HaysComboBoxLiteral"
width="{textWidth}" x="0"
y="0" text="{text}"/>
<mx:ComboBox id="Name" styleName="HaysComboBox"
x="{alignPos}" y="0"
width="{textWidth}"/>
<mx:Label styleName="HaysComboBoxDescription"
width="{descriptionSize}"
x="180" y="0" text="{description}"/>
</mx:Canvas>
</mx:HBox>
==================================================
4) HaysTextBox.mxml
<?xml version="1.0"
encoding="utf-8"?>
<mx:HBox xmlns:mx="http://www.macromedia.com/2003/mxml"
borderStyle="none">
<mx:Script>
var text;
var description;
var alignPos = 60;
var textSize = 100;
var descriptionSize = 120;
var name = "";
var textWidth = 75;
var maxChars = 5;
</mx:Script>
<mx:Canvas
styleName="HaysTextBoxCanvas">
<mx:Label
styleName="HaysTextBoxLiteral"
width="{textWidth}" x="0"
y="0" text="{text}"/>
<mx:TextInput id="Name" styleName="HaysTextBox"
x="{alignPos}" y="0"
width="{textSize}"/>
<mx:Label
styleName="HaysTextBoxDescription"
width="{descriptionSize}"
x="{alignPos + textSize + 5}" y="0"
text="{description}"/>
</mx:Canvas>
</mx:HBox>
======================================
5) Untitled_1.mxml
<?xml version="1.0"
encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
xmlns="*" styleName="Plain"
backgroundColor="0xFFFFFF">
<mx:Style
source="MyStylesheet.css"/>
<!-- Create a LinkBar container to navigate the
ViewStack
container. -->
<mx:LinkBar
dataProvider="AddressTabs" borderStyle="solid" />
<mx:ViewStack id="AddressTabs" x="2" y="2"
borderStyle="solid">
<mx:Form label="Address1" minWidth="200">
<mx:FormItem label="" required="true">
<HaysTextBox id="txtName_1" textWidth="50"
text="Literal 1"
alignPos="100" textSize="75"
description="Description 1"
descriptionSize="100"/>
</mx:FormItem>
<mx:FormItem label="Address" required="true">
<mx:TextInput id="txtRoad_1" height="20"
width="250"/>
<mx:TextInput id="txtTown_1" height="20"
width="250"/>
<mx:TextInput id="txtCounty_1" height="20"
width="250"/>
</mx:FormItem>
<mx:FormItem label="Post Code" required="true">
<mx:TextInput id="txtPCode_1" height="20"
width="70"/>
</mx:FormItem>
<mx:FormItem label="Country" required="true">
<HaysComboBox id="cmbCountry_1"/>
<HaysComboBox
id="cmbCountry_2"/>
</mx:FormItem>
</mx:Form>
<mx:Form label="Address3" minWidth="200">
<mx:FormItem label="Road" required="true">
<mx:TextInput id="txtRoad_3" height="20"
width="50"/>
</mx:FormItem>
<mx:FormItem label="Town" required="true">
<mx:TextInput id="txtTown_3" height="20"
width="50"/>
</mx:FormItem>
<mx:FormItem label="County" required="true">
<mx:TextInput id="txtCounty_3" height="20"
width="50"/>
</mx:FormItem>
<mx:FormItem label="Post Code" required="true">
<mx:TextInput id="txtPCode_3" height="20"
width="50"/>
</mx:FormItem>
</mx:Form>
<mx:VBox label="VBox Container">
<HaysTextBox id="txtName_3" textWidth="50"
text="Literal 1"
alignPos="100" textSize="75"
description="Description 1"
descriptionSize="100"/>
<HaysComboBox id="cmbCountry_4"/>
</mx:VBox>
<mx:VBox
styleName="HaysLiteralVBox" label="Order Status"
width="200">
<HaysLiteral text="Status"
data=""
alignPos="80"/>
<HaysLiteral text="Total Lines"
data=""
alignPos="80"/>
<HaysLiteral text="Total Units"
data=""
alignPos="80"/>
<HaysLiteral text="Returns No"
data=""
alignPos="80"/>
<HaysLiteral text="Cust Status"
data=""
alignPos="80"/>
</mx:VBox>
</mx:ViewStack>
</mx:Application>
=========================================
--- In [email protected], Matt Chotin
<[EMAIL PROTECTED]> wrote:
> Could you post some sample code so see
exactly what you're
trying? It'll
> make it easier for us to identify our bug or
limitation or simply
put you on
> the right path.
>
>
>
> Matt
>
>
>
> -----Original Message-----
> From: bobpardoe1959 [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, May 04, 2004 12:58 AM
> To: [email protected]
> Subject: [flexcoders] mxml components not
honoring external css
styles ?
>
>
>
> I have created three components one is a
combobox, a label and the
> other a text box. The label works fine. The
other two however do
not
> seem to be picking up the stylesheet settings
of the form in which
> they are placed.
>
> For example if I set the height of the
textbox in the css file it
is
> ignored, but if I put it in the component is
works.
>
> Also in a related matter, the textbox does
not seem to like having
> its position in a canvas calculated at
runtime.
>
> For example if I do x="{(offset +
5)}" it does not work. Offset is
> set by the form on which the component is
placed.
>
> Any ideas appreciated
>
> Thanks
>
> BOb
>
>
>
>
> _____
>
> Yahoo! Groups Links
>
>
* To visit your group on the
web, go to:
> http://groups.yahoo.com/group/flexcoders/
> <http://groups.yahoo.com/group/flexcoders/>
>
>
> *
To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
<mailto:[EMAIL PROTECTED]
subject=Unsubscribe>
>
>
>
* Your use of Yahoo! Groups is
subject to the Yahoo! Terms
of
> <http://docs.yahoo.com/info/terms/>
Service.