Re: [flexcoders] Re: How to collapse Panel?

2006-08-17 Thread Samuel Reuben



That's good to know Sergey,

So now you can do it like this... as Gordon says:
If you need to know that calculated height, you can subclass Panel and get titleBar.height. If you are arguing that there should be a public property or method for returning this value, please explain your use case for needing this.


Thanks,
-sam
On 8/16/06, Sergey Kovalyov [EMAIL PROTECTED] wrote:






I have reimplemented getHeaderHeight() method that is private in Panel unfortunately. I do not want to apply new headerHeight style property value, but I want to know default. Sure, it is based on the style of the title text, though it is still calculable. 


On 8/16/06, Samuel Reuben 
[EMAIL PROTECTED] wrote: 



Hi Sergey,

Good observation. Why do you need the header height? The documentation says, The default value is based on the style of the title text.
Sothere is no fixed default header height, it depends on the Title text font size.

Having said that, the getStyle(headerHeight) should return the actual height of the header.

So for now, if you really want a number returned set the headerHeight and it will work fine.

Thanks,
-sam

 

__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



Re: [flexcoders] Re: How to collapse Panel?

2006-08-17 Thread Sergey Kovalyov
I do not consider it should be public. Probably, protected is more
suitable in this case. I needed it to create CollapsablePanel. Sure,
via subclassing. The code is available below:

?xml version=1.0 encoding=utf-8?
CollapsablePanelBase xmlns:mx=http://www.adobe.com/2006/mxml;
xmlns=controls.panel.*

states
mx:State name={COLLAPSED_STATE}
mx:SetProperty name=height 
value={getHeaderHeight()} /
/mx:State
/states

/CollapsablePanelBase

Sure, CollapsablePanelBase is subclassed from Panel and protected
method getHeaderHeight() is defined there as well as COLLAPSED_STATE
constant.

Sergey.

 That's good to know Sergey,

 So now you can do it like this... as Gordon says:
 If you need to know that calculated height, you can subclass Panel and get 
 titleBar.height. If you are arguing that there should be a public property or 
 method for returning this value, please explain your use case for needing 
 this.

 Thanks,
 -sam


--
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/
 




Re: [flexcoders] Re: How to collapse Panel?

2006-08-16 Thread Samuel Reuben



Hi Sergey,

Good observation. Why do you need the header height? The documentation says, The default value is based on the style of the title text.
Sothere is no fixed default header height, it depends on the Title text font size.

Having said that, the getStyle(headerHeight) should return the actual height of the header.

So for now, if you really want a number returned set the headerHeight and it will work fine.

Thanks,
-sam
On 8/12/06, Sergey Kovalyov [EMAIL PROTECTED] wrote:






Any ideas regarding why headerHeight style equals undefined by defaultand how to get its default value? :(
On 8/11/06, Sergey Kovalyov [EMAIL PROTECTED]
 wrote: I found this example in help and wonder how to make it works: ?xml version=1.0 encoding=utf-8? mx:Panel xmlns:mx=
http://www.adobe.com/2006/mxml mouseDown=checkCollapse(event) resizeEffect=Resize mx:Script ![CDATA[ private function checkCollapse(event:MouseEvent):void
 { // If the user clicks the panel header, collapse/expand the panel. if (event.localY  getStyle(headerHeight)) { currentState = currentState == collapsed ?  : collapsed;
 } } ]] /mx:Script mx:states mx:State name=collapsed mx:SetProperty name=height value={getStyle('headerHeight')}/
 /mx:State /mx:states /mx:Panel I just wrapped it into application: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=
http://www.adobe.com/2006/mxml mx:Script ![CDATA[ import 
mx.controls.Alert; private function checkCollapse(event:MouseEvent):void { // If the user clicks the panel header, collapse/expand the panel. if (event.localY  getStyle(headerHeight)) {
 currentState = currentState == collapsed ?  : collapsed; } } ]] /mx:Script mx:states mx:State name=collapsed
 mx:SetProperty name=height value={getStyle('headerHeight')}/ /mx:State /mx:states mx:Panel xmlns:mx=
http://www.adobe.com/2006/mxml mouseDown=checkCollapse(event) resizeEffect=Resize mx:TextArea / /mx:Panel /mx:Application
 You could check via debugging that (event.localY  getStyle(headerHeight)) is always false. On 8/11/06, Sergey Kovalyov 
[EMAIL PROTECTED] wrote:  Hi All!   I want to create collapsable Panel via states. I use mx:SetProperty  to change height to myPanel.getStyle(headerHeight) value, but this
  method return undefined. What is wrong?   Regards, Sergey.

 

__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



Re: [flexcoders] Re: How to collapse Panel?

2006-08-16 Thread Sergey Kovalyov



I have reimplemented getHeaderHeight() method that is private in Panel unfortunately. I do not want to apply new headerHeight style property value, but I want to know default. Sure, it is based on the style of the title text, though it is still calculable.

On 8/16/06, Samuel Reuben [EMAIL PROTECTED] wrote:



Hi Sergey,

Good observation. Why do you need the header height? The documentation says, The default value is based on the style of the title text.
Sothere is no fixed default header height, it depends on the Title text font size.

Having said that, the getStyle(headerHeight) should return the actual height of the header.

So for now, if you really want a number returned set the headerHeight and it will work fine.

Thanks,
-sam

__._,_.___





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








   






  
  
SPONSORED LINKS
  
  
  

Software development tool
  
  
Software development
  
  
Software development services
  
  


Home design software
  
  
Software development company
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



[flexcoders] Re: How to collapse Panel?

2006-08-11 Thread Sergey Kovalyov
I found this example in help and wonder how to make it works:

?xml version=1.0 encoding=utf-8?
mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml;
mouseDown=checkCollapse(event) resizeEffect=Resize
mx:Script
![CDATA[
private function checkCollapse(event:MouseEvent):void
{
// If the user clicks the panel header, collapse/expand the panel.
if (event.localY  getStyle(headerHeight)) {
currentState = currentState == collapsed ?  : collapsed;
}
}
]]
/mx:Script

mx:states
mx:State name=collapsed
mx:SetProperty name=height value={getStyle('headerHeight')}/
/mx:State
/mx:states
/mx:Panel

I just wrapped it into application:

?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;

mx:Script
![CDATA[
import mx.controls.Alert;
private function checkCollapse(event:MouseEvent):void
{
// If the user clicks the panel header, collapse/expand the panel.
if (event.localY  getStyle(headerHeight)) {
currentState = currentState == collapsed ?  : collapsed;
}
}
]]
/mx:Script

mx:states
mx:State name=collapsed
mx:SetProperty name=height value={getStyle('headerHeight')}/
/mx:State
/mx:states

mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml;
mouseDown=checkCollapse(event) resizeEffect=Resize
mx:TextArea /
/mx:Panel


/mx:Application

You could check via debugging that (event.localY 
getStyle(headerHeight)) is always false.

On 8/11/06, Sergey Kovalyov [EMAIL PROTECTED] wrote:
 Hi All!

 I want to create collapsable Panel via states. I use mx:SetProperty
 to change height to myPanel.getStyle(headerHeight) value, but this
 method return undefined. What is wrong?

 Regards, Sergey.


--
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/
 





[flexcoders] Re: How to collapse Panel?

2006-08-11 Thread Sergey Kovalyov
Any ideas regarding why headerHeight style equals undefined by default
and how to get its default value? :(

On 8/11/06, Sergey Kovalyov [EMAIL PROTECTED] wrote:
 I found this example in help and wonder how to make it works:

 ?xml version=1.0 encoding=utf-8?
 mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml;
 mouseDown=checkCollapse(event) resizeEffect=Resize
mx:Script
![CDATA[
private function checkCollapse(event:MouseEvent):void
{
// If the user clicks the panel header, collapse/expand the panel.
if (event.localY  getStyle(headerHeight)) {
currentState = currentState == collapsed ?  : collapsed;
}
}
]]
/mx:Script

mx:states
mx:State name=collapsed
mx:SetProperty name=height value={getStyle('headerHeight')}/
/mx:State
/mx:states
 /mx:Panel

 I just wrapped it into application:

 ?xml version=1.0 encoding=utf-8?
 mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;

mx:Script
![CDATA[
import mx.controls.Alert;
private function checkCollapse(event:MouseEvent):void
{
// If the user clicks the panel header, collapse/expand the panel.
if (event.localY  getStyle(headerHeight)) {
currentState = currentState == collapsed ?  : collapsed;
}
}
]]
/mx:Script

mx:states
mx:State name=collapsed
mx:SetProperty name=height value={getStyle('headerHeight')}/
/mx:State
/mx:states

mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml;
 mouseDown=checkCollapse(event) resizeEffect=Resize
mx:TextArea /
/mx:Panel


 /mx:Application

 You could check via debugging that (event.localY 
 getStyle(headerHeight)) is always false.

 On 8/11/06, Sergey Kovalyov [EMAIL PROTECTED] wrote:
  Hi All!
 
  I want to create collapsable Panel via states. I use mx:SetProperty
  to change height to myPanel.getStyle(headerHeight) value, but this
  method return undefined. What is wrong?
 
  Regards, Sergey.



--
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/