[flexcoders] Panel height 100% don't scroll

2007-03-09 Thread Norbert Csík
Hi!

I have a simple Flex application running in a browser directly
referencing the swf file. The application has a Panel element with
height 100%. It works fine, has the correct size, but when the window
gets too small the scroll bar appears in the Application not in the Panel.

Can you tell me why? I thought the Panel should always be 100% of its
parent container but it seems to be as big as its content.

How can I achive that if the space is too small the scroll bar would
be displayed in the Panel not in the Application?

Thanks in advance, here's my sample code:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
mx:Panel title=Stuff height=100%
mx:FormItem label=Type
mx:TextInput/
/mx:FormItem
mx:FormItem label=Type
mx:TextInput/
/mx:FormItem
mx:FormItem label=Type
mx:TextInput/
/mx:FormItem
mx:FormItem label=Type
mx:TextInput/
/mx:FormItem
mx:FormItem label=Type
mx:TextInput/
/mx:FormItem
mx:FormItem label=Type
mx:TextInput/
/mx:FormItem
mx:FormItem label=Type
mx:TextInput/
/mx:FormItem
mx:FormItem label=Type
mx:TextInput/
/mx:FormItem
mx:FormItem label=Type
mx:TextInput/
/mx:FormItem
mx:FormItem label=Type
mx:TextInput/
/mx:FormItem

mx:ControlBar id=cb
mx:Button label=save/
/mx:ControlBar
/mx:Panel
/mx:Application

nOR



[flexcoders] Re: Panel height 100% don't scroll

2007-03-09 Thread Norbert Csík
Fantastic! It works. Thanks.

nOR

--- In flexcoders@yahoogroups.com, Michael Schmalle
[EMAIL PROTECTED] wrote:

 On 3/9/07, Norbert Csík [EMAIL PROTECTED] wrote:
  Hi!
 
  I have a simple Flex application running in a browser directly
  referencing the swf file. The application has a Panel element with
  height 100%. It works fine, has the correct size, but when the window
  gets too small the scroll bar appears in the Application not in
the Panel.
 
  Can you tell me why? I thought the Panel should always be 100% of its
  parent container but it seems to be as big as its content.
 
  How can I achive that if the space is too small the scroll bar would
  be displayed in the Panel not in the Application?
 
  Thanks in advance, here's my sample code:
 
  ?xml version=1.0 encoding=utf-8?
  mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
  mx:Panel title=Stuff height=100%
  mx:FormItem label=Type
  mx:TextInput/
  /mx:FormItem
  mx:FormItem label=Type
  mx:TextInput/
  /mx:FormItem
  mx:FormItem label=Type
  mx:TextInput/
  /mx:FormItem
  mx:FormItem label=Type
  mx:TextInput/
  /mx:FormItem
  mx:FormItem label=Type
  mx:TextInput/
  /mx:FormItem
  mx:FormItem label=Type
  mx:TextInput/
  /mx:FormItem
  mx:FormItem label=Type
  mx:TextInput/
  /mx:FormItem
  mx:FormItem label=Type
  mx:TextInput/
  /mx:FormItem
  mx:FormItem label=Type
  mx:TextInput/
  /mx:FormItem
  mx:FormItem label=Type
  mx:TextInput/
  /mx:FormItem
  
  mx:ControlBar id=cb
  mx:Button label=save/
  /mx:ControlBar
  /mx:Panel
  /mx:Application
 
  nOR
 
 
 
 Hi, try adding this;
 
 mx:Panel title=Stuff height=100% minHeight=0
 
 Peace, Mike
 
 -- 
 Teoti Graphix
 http://www.teotigraphix.com
 
 Blog - Flex2Components
 http://www.flex2components.com
 
 You can find more by solving the problem then by 'asking the question'.





[flexcoders] Re: [flex2dev] Object type Coercion error.

2006-07-12 Thread Norbert Csík
I think there is a problem with repeaters and custom components.
Please consider the following code:

?xml version=1.0?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:local=*
mx:Script
![CDATA[
[Bindable]
private var dp:Array = [1, 2, 3, 4, 5, 6, 7, 8, 9];
]]
/mx:Script

mx:Repeater id=rp dataProvider={dp}
local:VB
mx:Button height=49 width=50 
label={String(rp.currentItem)} /
/local:VB
/mx:Repeater
  
/mx:Application


Where The VB is a custom component extending a VBox:

?xml version=1.0 encoding=utf-8?
VBox xmlns=lib.tx.* xmlns:mx=http://www.adobe.com/2006/mxml;
width=100 height=100

/VBox

But if you compile and run this code it fails with the error
TypeError: Error #1034: Type Coercion failed: cannot convert
mx.controls::[EMAIL PROTECTED] to Array.

One interesting point is if you replace the {String(rp.currentItem)}
binding in the button with some static string it works:

mx:Button height=49 width=50 label=tryit /

So there's a problem with the repater. What do you think?

nOR

--- In flexcoders@yahoogroups.com, Ian Skinner [EMAIL PROTECTED] wrote:

 it is not a problem to use repeaters and custom components AFAIK. I
 will note that sometimes you need to create your own getter/setter
 methods for use. I don't thinks that's the issue with Ian though, but
 could be.
 
 DK
 






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/