Hi Venkat,
I am pasting my code below. This is somewhar similar to what I have
and I hope it gives you an idea what I am trying to implement. In this
code I have an image, 2 text input boxes. The second textinput box is
visible a bit far(equal to height of the slider). what I want is that
there should not be any space(betn the first row and second row)when
the slider is no visible, and when I click the slider it should
overlap the components that are below it, somethin like a combo box.
=====================================
layout="absolute" xmlns:custom="*" >
<mx:Script>
<![CDATA[
]]>
</mx:Script>
<mx:VBox>
<mx:VBox>
<custom:VSliderComp id="vslidercomp"/>
<mx:TextInput/>
</mx:VBox>
</mx:VBox>
</mx:Application>
==================
slider comp
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="
http://www.adobe.com/2006/mxml" width="100%">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.ColorPickerEvent;
import mx.events.SliderEvent;
public function showSlider():void {
vslider1.visible=true;
}
public function changeSliderValue():void {
size.text=vslider1.value.toString();
vslider1.visible=false;
}
]]>
</mx:Script>
<mx:HBox>
<mx:Image source="scroll_down.gif" click="showSlider()"/>
<mx:VSlider id="vslider1" minimum="0" maximum="50" snapInterval="1"
tickInterval="10" visible="false" change="changeSliderValue()" />
<mx:TextInput id="size" width="30" />
</mx:HBox>
</mx:VBox>
================
Thanks
On Jul 23, 5:07 pm, "Chanaka Mannapperuma" <
iru...@gmail.com> wrote:
> HI Deepa;
>
> please try to use
> <mx:Box
> you can overlap boxes as u want
>
> private function buttonClick():void{
>
> if(testBox.visible==false){
> testBox.visible=true;
>
> }else{
> testBox.visible=false;
>
> <mx:Box id="testBox" width="18%" height="100%" minHeight="1"
> showEffect="{wipeRight}" hideEffect="{wipeLeft}" backgroundColor="#ffff95"
>
> cheers;
> Chanaka
>
> On Thu, Jul 24, 2008 at 12:34 AM, Venkat Viswanathan <
helloven...@gmail.com>
> wrote:
>
>
>
>
>
> > Hi Deepa,
>
> > What you can do is, when you click this button, get the localX and localY
> > positions and convert them to global values with localToGlobal. And then
> > create a new canvas at the main application level (make the application's
> > layout as absolute) and place your slider in this newly created canvas. This
> > way you can dynamically postion the slider and it will overlap the other
> > components as well.
>
> > If you did not get what I meant to say, please show me your code and i'll
> > tell u how to implement it.
>
> > Regards,
> > Venkat
>
> mmannapper...@virtusa.com- Hide quoted text -