+1
Résolu

Can't set style properties?

sstava il y a 12 ans mis à jour par icahill (Administrator) il y a 12 ans 6
I am failing at changing style properties, except for background. I have included my code sample. Any help is appreciated. My goal was to make it look like the panel was pressed...then I got caught up in trying to change any style properties.



<wire>
<datasources>
</datasources>

<styles>
<style name="btn-style" borderwidth="2" bordercolor="ffffcc" shadowradius="5" shadowopacity=".5" shadowyoffset="5" background="ffff66" width="90%" height="80%" align="center" valign="center" cornerradius="20"></style>
<style name="btn-style-down" borderwidth="10" bordercolor="000000" shadowradius="0" shadowopacity="0" shadowyoffset="0" background="aabbcc" width="45%" height="45%" align="left" valign="center" cornerradius="20"></style>
</styles>

<classes>
</classes>

<main>
<panel name="styleChange" alias="STYLECHANGE" style="btn-style" onclickup="chg-style">
<text name="callus" text="Style Change" width="90%" height="90%" align="center" valign="center" alignment="center" size="18" font="helvetica">
</text>
</panel>
</main>

<actions>
<action name="chg-style">
<assign property="object:STYLECHANGE.background" value="aabbcc" />
<assign property="object:STYLECHANGE.cornerradius" value="5" />
<assign property="object:STYLECHANGE.shadowyoffset" value="0" />
<assign property="object:STYLECHANGE.shadowopacity" value="0" />
<assign property="object:STYLECHANGE.shadowradius" value="0" />
<assign property="object:STYLECHANGE.borderwidth" value="10" />
<assign property="object:STYLECHANGE.bordercolor" value="000000" />
<assign property="object:STYLECHANGE.width" value="45%" />
<assign property="object:STYLECHANGE.height" value="45%" />
<assign property="object:STYLECHANGE.style" value="btn-style-down" />
</action>
</actions>
</wire>


I saw that height is read-only. I am wondering if the others are as well. I couldn't get to the panel wire definition. It said the page didn't exist...so I thought I would post the question :)
It looks like your styles are applying to your panel correctly. I think the real question you have is with your chg-style action. This is using the concept of object properties.

If you go and look at the panel page you will find a list of object properties you can write to. Several attributes you are trying to change are not valid object properties.

What page were you at when you got the panel page missing link if you don't mind?
From here:
http://content.rarewire.com/wordpress/

Clicked on link and was sent to:
http://content.rarewire.com/wordpress...

Which displayed this message:
"This is somewhat embarrassing, isn’t it?
It seems we can’t find what you’re looking for. Perhaps searching, or one of the links below, can help."
That is very strange! That is the main link and it should not take you to that odd link. You might try refreshing your cookies in your browser.

Were you able to get to it with the link I sent?
Your link worked and clearing cookies and data fixed the problem. Thanks!
I think I found where the incorrect url came from for the tag, and others. If you hover over the link icon in the App Creation Studio's Wire Definitions in the left navigation section when in the editor for an app...you will see the incorrect URLs...at least I do :)
Ah great I will check it out! Thanks.