wiln / flexlib

Automatically exported from code.google.com/p/flexlib
0 stars 0 forks source link

WIndowshade HeaderRenderer #275

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a Windowshade with a canvasbutton as its headerRenderer
2. Try to pass data to the header renderer. There is no headerText or data 
property
3.

What is the expected output? What do you see instead?
User should be able to pass data to header renderer through the data 
property. 
Not able to pass data to header renderer

What version of the product are you using? On what operating system?
flex-lib 1.1, on windows xp

Please provide any additional information below.

I am trying to create a re-usable windowshade with a canvas button as its 
headerRenderer. Is it possible to pass data to canvas button as if we do 
for itemrenderers and header renderers in list based controls, using the 
data property.

Original issue reported on code.google.com by shameers...@gmail.com on 12 Feb 2010 at 8:14

GoogleCodeExporter commented 8 years ago
Hi shameersalim,

I think I know what you are talking about.

In order to pass data to the components in the header renderer you need to do 
this:

1. <flexlibContainer:WindowShade  data="My data">  --> you set the data on the 
window
shade level.

2. You access it in the renderer like this:
 <flexlibContainer:headerRenderer>
    <mx:Component>
       <flexlibControl:CanvasButton label="{WindowShade(parent).data}"

I hope this solve your problem,

Cheers,

Viktor Stevich

Original comment by fisherne...@googlemail.com on 7 Apr 2010 at 9:45

GoogleCodeExporter commented 8 years ago
Hello, I was wondering if the solution proposed above works...It does not 
appear to work for me. Well, I am getting a warning

warning: unable to bind to property 'parent' on class 
'com.blah.view.browse.skin::FileNameInnerClass0'

where I am referencing the data value {WindowShade(parent).data}

from the parent WindowShade tag

    <flexlib:WindowShade id="browseButton"
                         opened="true"
                         paddingTop="0"
                         headerLocation="bottom"
                         openEnd="mainBrowser.visible=false; browseButton.height = this.height;MainBrowseAreaDrawerSkin.icon = MainBrowseAreaDrawerSkin.addIcon"
                         closeEnd="mainBrowser.visible=true; MainBrowseAreaDrawerSkin.icon = MainBrowseAreaDrawerSkin.closeIcon"
                         width="100%"
                         height="100%"
                         chromeColor="#83389b"
                         openDuration="1000"
                         data="{hostComponent.mySeriesLength}">

should WindowShade(parent) be parentDocument (Flex 4)?

thanks

Edward

Original comment by edwardan...@gmail.com on 29 Jul 2010 at 8:50