Dynamic grid of buttons

I'm trying to create a panel with a varying number of buttons in it, layed out in a grid.  However, most of what I've tried hasn't worked, especially in regards to resizing the containing window.
Attached are two methods I've tried, along with a little test script to drive the functions (change the "if" statement in the bottom lambda to switch between them).  I've also tried fiddling with the layout.resize and layout.layout methods, but haven't had much luck (esp. since layout.resize simply crashes when I try it).
Any chance anyone here might have some pointers?
Thanks,
John

Try doing the calcualations in-line. getButtonWidth() is a
function, and thus hard to bind to.
<mx:Button id="submitButton" label="SQL"
width="{15/100*summaryPanel.width}" textAlign="center"/>
Since summaryPanel.width is reference directly in the
binding, the compiler will automatically adjust the button's width
for you whenever summaryPanel's width changes.

Similar Messages

  • Dynamic Grid Layout Dreamweaver CS6

    The Dynamic Grid Layout is the main reason for purchase new version of Dreamweaver .
    Dynamic Grid Layout in Dreamweaver CS6 does not work nice, columns are not modify with the mouse, jumps back to the old postition. On You Tube it all looks so very easily, but in practice is all very sloppy about ...
    Ask the forum, Do I have to drag a button to hold...
    If I adjust the width on the left side of the div, I left a red band that set ....
    Where is a make proper manual to find ....

    Thanks for our suggestions, i keep trying, but Easy NO…..
    Geert
    Van: Nancy O. [email protected]
    Verzonden: donderdag 10 mei 2012 17:11
    Aan: Geertskigek
    Onderwerp: Dynamic Grid Layout Dreamweaver CS6
    Re: Dynamic Grid Layout Dreamweaver CS6
    created by Nancy O. <http://forums.adobe.com/people/Nancy+O.>  in Dreamweaver - View the full discussion <http://forums.adobe.com/message/4394107#4394107

  • Dynamic actions on button and dynamic column name

    Hi!ynam
    I want to create a dynamic action on button click in my tabular form.
    I have a select list with values of my column names (P7_X_COLUMN) and a text field where users input values for update (P7_X_UVALUE).
    My idea is that when they click the button, they update selected column to desired value in all rows.
    However, I get the following error:
    ORA-06550: line 5, column 5: PL/SQL: ORA-01747: invalid user.table.column, table.column, or column specification ORA-06550: line 4, column 1: PL/SQL: SQL Statement ignored (Go to error)
    It seems to me that I have not referenced the column name correctly, I thought it was the same as referencing values. How do I do that?
    This is my code:
    begin
    update "#OWNER#"."IZV_SLOG_DET"
    set :P7_X_COLUMN=:P7_X_UVALUE;
    end;
    Regards,
    Ivan

    I got it to work, but the query is too big. Can anyone help me with how to get it to work?
    I tried breaking it into more varchar2 strings, but i always get the same error:
    Error processing row.
    ORA-01461: can bind a LONG value only for insert into a LONG column
    declare  
    l_table_name varchar2(30) := 'IZV_SLOG_DET_POM'; 
    l_sql_stmt varchar2(32762);
    begin
    l_sql_stmt := 'update ' || l_table_name || ' set ' || :P7_X_COLUMN || ' =''' || :P7_X_UVALUE|| '''' ||
    'where'||
    'nvl(MSR_PRD_ID,1) = nvl(nvl(''' || :P7_X_MSR_PRD_ID || '''' || ',MSR_PRD_ID),1) and' ||
    'nvl(SRC_STM_ID,1) = nvl(nvl(''' || :P7_X_SRC_STM_ID || '''' || ',SRC_STM_ID),1) and' ||
    'nvl(OZNAKA_KOMITENTA,1) = nvl(nvl(''' || :P7_X_OZNAKA_KOMITENTA || '''' || ',OZNAKA_KOMITENTA),1) and' ||
    'nvl(RSP,1) = nvl(nvl(''' || :P7_X_RSP || '''' || ',RSP),1) and' ||
    'nvl(OZNAKA_RETKA,1) = nvl(nvl(''' || :P7_X_OZNAKA_RETKA || '''' || ',OZNAKA_RETKA),1) and' ||
    'nvl(OZNAKA_IZVJESCA,1) = nvl(nvl(''' || :P7_X_OZNAKA_IZVJESCA || '''' || ',OZNAKA_IZVJESCA),1) and' ||
    'nvl(MBR_KOMITENTA,1) = nvl(nvl(''' || :P7_X_MBR_KOMITENTA || '''' || ',MBR_KOMITENTA),1) and' ||
    'nvl(KOMITENT_NEREZ,1) = nvl(nvl(''' || :P7_X_KOMITENT_NEREZ || '''' || ',KOMITENT_NEREZ),1) and' ||
    'nvl(ZUPANIJA,1) = nvl(nvl(''' || :P7_X_ZUPANIJA || '''' || ',ZUPANIJA),1) and' ||
    'nvl(DRZAVA,1) = nvl(nvl(''' || :P7_X_DRZAVA || '''' || ',DRZAVA),1) and' ||
    'nvl(SEKTOR_NEREZIDENTA,1) = nvl(nvl(''' || :P7_X_SEKTOR_NEREZIDENTA || '''' || ',SEKTOR_NEREZIDENTA),1) and' ||
    'nvl(VRSTA_POVEZANOSTI,1) = nvl(nvl(''' || :P7_X_VRSTA_POVEZANOSTI || '''' || ',VRSTA_POVEZANOSTI),1) and' ||
    'nvl(INSTRUMENT,1) = nvl(nvl(''' || :P7_X_INSTRUMENT || '''' || ',INSTRUMENT),1) and' ||
    'nvl(VALUTA,1) = nvl(nvl(''' || :P7_X_VALUTA || '''' || ',VALUTA),1) and' ||
    'nvl(OTKAZNI_ROK,1) = nvl(nvl(''' || :P7_X_OTKAZNI_ROK || '''' || ',OTKAZNI_ROK),1) and' ||
    'nvl(IZVORNO_DOSPIJECE,1) = nvl(nvl(''' || :P7_X_IZVORNO_DOSPIJECE || '''' || ',IZVORNO_DOSPIJECE),1) and' ||
    'nvl(VRSTA_INDEKSACIJE,1) = nvl(nvl(''' || :P7_X_VRSTA_INDEKSACIJE || '''' || ',VRSTA_INDEKSACIJE),1) and' ||
    'nvl(VALUTA_INDEKSACIJE,1) = nvl(nvl(''' || :P7_X_VALUTA_INDEKSACIJE || '''' || ',VALUTA_INDEKSACIJE),1) and' ||
    'nvl(PORTFELJ,1) = nvl(nvl(''' || :P7_X_PORTFELJ || '''' || ',PORTFELJ),1) and' ||
    'nvl(UTRZIVOST_KREDITA,1) = nvl(nvl(''' || :P7_X_UTRZIVOST_KREDITA || '''' || ',UTRZIVOST_KREDITA),1) and' ||
    'nvl(ZNACAJKE_KAPITALA,1) = nvl(nvl(''' || :P7_X_ZNACAJKE_KAPITALA || '''' || ',ZNACAJKE_KAPITALA),1) and' ||
    'nvl(RIZICNA_SKUPINA,1) = nvl(nvl(''' || :P7_X_RIZICNA_SKUPINA || '''' || ',RIZICNA_SKUPINA),1) and' ||
    'nvl(UGRADJENI_DERIVAT,1) = nvl(nvl(''' || :P7_X_UGRADJENI_DERIVAT || '''' || ',UGRADJENI_DERIVAT),1) and' ||
    'nvl(ODNOSNA_VARIJABLA,1) = nvl(nvl(''' || :P7_X_ODNOSNA_VARIJABLA || '''' || ',ODNOSNA_VARIJABLA),1) and' ||
    'nvl(PREDZNAK,1) = nvl(nvl(''' || :P7_X_PREDZNAK || '''' || ',PREDZNAK),1) and' ||
    'nvl(VRSTA_IZNOSA,1) = nvl(nvl(''' || :P7_X_VRSTA_IZNOSA || '''' || ',VRSTA_IZNOSA),1) and' ||
    'nvl(KOMITENT_PBR,1) = nvl(nvl(''' || :P7_X_KOMITENT_PBR || '''' || ',KOMITENT_PBR),1) and' ||
    'nvl(UDJELI_POVEZ_C,1) = nvl(nvl(''' || :P7_X_UDJELI_POVEZ_C || '''' || ',UDJELI_POVEZ_C),1) and' ||
    'nvl(AR_ID,1) = nvl(nvl(''' || :P7_X_AR_ID || '''' || ',AR_ID),1) and' ||
    'nvl(AU_ID,1) = nvl(nvl(''' || :P7_X_AU_ID || '''' || ',AU_ID),1) and' ||
    'nvl(AR_BUSS_ID,1) = nvl(nvl(''' || :P7_X_AR_BUSS_ID || '''' || ',AR_BUSS_ID),1) and' ||
    'nvl(MTI_CCY_TP_ID,1) = nvl(nvl(''' || :P7_X_MTI_CCY_TP_ID || '''' || ',MTI_CCY_TP_ID),1) and' ||
    'nvl(REG_NO,1) = nvl(nvl(''' || :P7_X_REG_NO || '''' || ',REG_NO),1) and' ||
    'nvl(REG_SFX,1) = nvl(nvl(''' || :P7_X_REG_SFX || '''' || ',REG_SFX),1) and' ||
    'nvl(JMBG_ID_NO,1) = nvl(nvl(''' || :P7_X_JMBG_ID_NO || '''' || ',JMBG_ID_NO),1) and' ||
    'nvl(IP_ID,1) = nvl(nvl(''' || :P7_X_IP_ID || '''' || ',IP_ID),1) and' ||
    'nvl(TAX_ID_NO,1) = nvl(nvl(''' || :P7_X_TAX_ID_NO || '''' || ',TAX_ID_NO),1) and' ||
    'nvl(INSTRUMENT_OLD,1) = nvl(nvl(''' || :P7_X_INSTRUMENT_OLD || '''' || ',INSTRUMENT_OLD),1) and' ||
    'nvl(PREDZNAK_OLD,1) = nvl(nvl(''' || :P7_X_PREDZNAK_OLD || '''' || ',PREDZNAK_OLD),1) and' ||
    'nvl(NAPOMENA,1) = nvl(nvl(''' || :P7_X_NAPOMENA || '''' || ',NAPOMENA),1) and' ||
    'nvl(NOVI_POSAO_F,1) = nvl(nvl(''' || :P7_X_NOVI_POSAO_F || '''' || ',NOVI_POSAO_F),1) and' ||
    'nvl(LISTA_SUMARNA,1) = nvl(nvl(''' || :P7_X_LISTA_SUMARNA || '''' || ',LISTA_SUMARNA),1) and' ||
    'nvl(LISTA_REKAP,1) = nvl(nvl(''' || :P7_X_LISTA_REKAP || '''' || ',LISTA_REKAP),1) and' ||
    'nvl(DZS_IDY_CL_ID,1) = nvl(nvl(''' || :P7_X_DZS_IDY_CL_ID || '''' || ',DZS_IDY_CL_ID),1) and' ||
    'nvl(HNB_IP_CL_ID,1) = nvl(nvl(''' || :P7_X_HNB_IP_CL_ID || '''' || ',HNB_IP_CL_ID),1) and' ||
    'nvl(NO_DYS_OO,1) = nvl(nvl(''' || :P7_X_NO_DYS_OO || '''' || ',NO_DYS_OO),1) and' ||
    'nvl(POSTOTAK1,1) = nvl(nvl(''' || :P7_X_POSTOTAK1 || '''' || ',POSTOTAK1),1) and' ||
    'nvl(POSTOTAK2,1) = nvl(nvl(''' || :P7_X_POSTOTAK2 || '''' || ',POSTOTAK2),1) and' ||
    'nvl(POSTOTAK3,1) = nvl(nvl(''' || :P7_X_POSTOTAK3 || '''' || ',POSTOTAK3),1) and' ||
    'nvl(BNK_ID,1) = nvl(nvl(''' || :P7_X_BNK_ID || '''' || ',BNK_ID),1) and'||
    'nvl(ID,1) = nvl(nvl(''' || :P7_X_ID || '''' || ',ID),1) and' ||
    'nvl(ID_RETKA,1) = nvl(nvl(''' || :P7_X_ID_RETKA || '''' || ',ID_RETKA),1) and' ||
    'nvl(DATUM_STANJA,1) = nvl(nvl(''' || :P7_X_DATUM_STANJA || '''' || ',DATUM_STANJA),1) and' ||
    'nvl(IZNOS,1) = nvl(nvl(''' || :P7_X_IZNOS || '''' || ',IZNOS),1) and' ||
    'nvl(IZNOS_ACTUAL,1) = nvl(nvl(''' || :P7_X_IZNOS_ACTUAL || '''' || ',IZNOS_ACTUAL),1) and' ||
    'nvl(ACT_AR_BAL_KN,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL_KN || '''' || ',ACT_AR_BAL_KN),1) and' ||
    'nvl(ACT_AR_BAL,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL|| '''' || ',ACT_AR_BAL),1) and' ||
    'nvl(IZNOS_ACTUAL_OLD,1) = nvl(nvl(''' || :P7_X_IZNOS_ACTUAL_OLD || '''' || ',IZNOS_ACTUAL_OLD),1) and' ||
    'nvl(ACT_AR_BAL_KN_OLD,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL_KN_OLD || '''' || ',ACT_AR_BAL_KN_OLD),1) and' ||
    'nvl(ACT_AR_BAL_OLD,1) = nvl(nvl(''' || :P7_X_ACT_AR_BAL_OLD || '''' || ',ACT_AR_BAL_OLD),1) and' ||
    'nvl(EXG_RT_CRD_RSK_F,1) = nvl(nvl(''' || :P7_X_EXG_RT_CRD_RSK_F || '''' || ',EXG_RT_CRD_RSK_F),1) ';
    execute immediate l_sql_stmt; 
    end;

  • SP01 PL03: Click on Grid Link button, add-on disconnected error occured

    Hi Frank,
    I upgrade my add-on to SP01, there is an error when click Link button which in a UDT bound grid, the error shows 'System Message' with three option buttons, [Restart Add-on],[Log off the current company] and [Continue working without this Add-on], this error does not occur on SAP 2005 PL7,PL8, PL9 & PL10, but occurred on SP01 and SP01 PL03.
    The grid Link button link to master like BP, G/L Accout and Item.
    Hope there is a workaround way.
    Thanks.

    What version / PL was your Add-On compiled with before?
    Was it done with 2005A SP00 PL?? ?
    Anyway, I am happy to hear that it works now...
    regards,
    Frank

  • Shape retrieval; finding all polygons in a huge grid;dynamic grid

    Hi.
    1) Is it possible to find (fast) all shapes (eg. polygons) in huge 2D grid? and if yes how can I do it? or do I have to cluster (or sort) my shapes first to make the search fast?
    2)Is it possible to define a dynamic Grid
    not like
    SDO_DIM_ARRAY( -- 20X20 grid
    SDO_DIM_ELEMENT('X', 0, 20, 0.005),
    SDO_DIM_ELEMENT('Y', 0, 20, 0.005)
    but sthing like
    SDO_DIM_ARRAY( SDO_DIM_ELEMENT('X', 0, infinit, 0.05), SDO_DIM_ELEMENT('Y', 0, infinit, 0.05)
    thx

    no i am searching for something I haven't found neither in Oracle Spatial nor in Oracle spatial topology and network... documentation.
    Here is what I have:
    CREATE TABLE graphs ( id NUMBER PRIMARY KEY, name VARCHAR2(32), shape SDO_GEOMETRY, geom_id NUMBER);
    INSERT INTO Graphs VALUES( 1, 'OBJECT 1', SDO_GEOMETRY(
    2006, -- Multline string, 2 dimensions (X,Y),
    NULL, NULL,
    SDO_ELEM_INFO_ARRAY(1,1,8), SDO_ORDINATE_ARRAY(280,275, 208,168, 208,381, 280,275, 459,276, 90,168, 90,381)), 14);
    INSERT INTO Graphs VALUES(2, 'OBJECT 2',SDO_GEOMETRY(2006,NULL,NULL,SDO_ELEM_INFO_ARRAY(1,1,6), SDO_ORDINATE_ARRAY(15,17,10,16, 20,38, 28,27, 459,276, 90,168)), 15);
    INSERT INTO user_sdo_geom_metadata(TABLE_NAME,COLUMN_NAME,DIMINFO,SRID)VALUES('Graphs','shape',SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', 0, 600, 0.05),SDO_DIM_ELEMENT('Y', 0, 600,0.05)),NULL);
    CREATE INDEX Graphs_spatial_idx ON Graphs(shape) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
    If I would like to know if another Multiline- object (geometry2) with the coordinates 280,275, 208,168, 208,381 is in "object 1" anywhere in my table I can use something like SDO_COVERS(geometry1, geometry2);
    AND NOW here is my problem. Supposed I don 't have the coordinates of geometry2 but an equal Multiline (equal in considering the shape for example like 180,175, 108,68, 108,281). Is there a way to search over all my geometrys in my table if geometry2 COVERS IN ANY WAY (any direction) the geometry in the table. I could code the problem in java but I would like to know if Oracle Spatial or Topology network has functions that support subgraph search.

  • Dynamic Grid layout

    hi experts..
    I am facing problem with Dynamic grid layout .
    sample code ,and valuable inputs are well appreciated.
    Thanks in advance,
    Kranthi

    Hello Kranthi,
    Could you please elaborate what are you trying to achieve.
    Any UI element created dynamically would include the layout property as well.
    Regards
    Anurag Chopra

  • Creating a Function logic for dynamically created XML buttons

    Hi!
    It's me...... again! Now I've dynamically created some buttons using XML. They're spread around the stage and I've modified a tooltip script to give each button a tooltip on Mouse_Over. But to se the logic and make it work using AS3 is hard (for me). I want a function that accept to parameters: Tooltip text and  Object to tooltip.
    In my code I get this error msg when initiating the function on dynamically created buttons:
    1118: Implicit coercion of a value with static type flash.display:Sprite to a possibly unrelated type flash.display:MovieClip.
    I beleive there are more than one thing here needing a fix.
    Can someone have a look and give me a pointer?
    Thanks
    function contentTooltip(ttt:String, ttclip:MovieClip):void {
        ttclip.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
        function mouseOverHandler(e:MouseEvent):void {
            ttip.descr.text=ttt;
            ttip.x=stage.mouseX;
            ttip.y=stage.mouseY-15;
            ttclip.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
            ttclip.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
            ttip.visible = true;
        function mouseOutHandler(e:MouseEvent):void {
            ttip.visible = false;
            ttclip.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
            ttclip.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
        function mouseMoveHandler(e:MouseEvent):void {
            ttip.x=stage.mouseX;
            ttip.y=stage.mouseY-15;
    contentTooltip("Scale button",scale_btn);
    contentTooltip("Hide button",hide_btn);

    I totally agree with what Ned says and suggests. Nevertheless, I would like to support your thinking process.
    From the way you wrote the tooltip functionality it is apparent to me that you conceptualize as a programmer. Again, as Ned said, nested functions are evil. BUT, in a way, what classes accomplish is encapsulation/nesting of properties and functions under the same umbrella. It actually feels that what timeline does in general is nesting named functions within a single function we have no access to.
    How you wrote the code is actually a blueprint for a class that could handle the functionality. You, perhaps, are very ready to start coding with classes - not on the timeline.
    With that said, for the sake of theory, here is how your functionality can be rewritten on timeline:
    scale_btn.toolTip = "Scale button";
    test_btn.toolTip = "Test button";
    hide_btn.toolTip = "Hide button";
    scale_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    test_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    hide_btn.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
    var overTarget:MovieClip;
    function mouseOverHandler(e:MouseEvent):void {
         overTarget = e.currentTarget;
         ttip.descr.text = overTarget.toolTip;
         ttip.x = stage.mouseX;
         ttip.y = stage.mouseY - 15;
         overTarget.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
         overTarget.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
         setChildIndex(ttip, numChildren - 1);
         ttip.visible = true;
    function mouseOutHandler(e:MouseEvent):void {
         ttip.visible = false;
         overTarget.removeEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);
         overTarget.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler); 
    function mouseMoveHandler(e:MouseEvent):void {
         TweenMax.to(ttip, .5, { x:stage.mouseX, ease:Quart.easeOut } );
         TweenMax.to(ttip, .5, { y:stage.mouseY - ttclip.height / 2, ease:Quart.easeOut } );
         //ttip.x=stage.mouseX;
         //ttip.y=stage.mouseY-ttclip.height/2;

  • Dynamic Creation of Buttons and Actions HELP

    Hi there,
    I have got a problem (or maybe even two) with the dynamic Creation of buttons. The code below creates the buttons.
    My main problem is, that the parameter created for the button's action isn't propagated to the assigned event handler. I get a null, though the name of the parameter in the event handler and the name of the parameter added to the action are the same.
    Could it also be that I'm always using the same action? I.e. does wdThis.wdGetAddElementAction() always return the same action instance? If yes, how can I create individual actions for each button?
    Any help is appreciated!
    Cheers,
    Heiko
    "    for(int i=rootContainer.getChildren().length; i<wdContext.nodeFeature().size();i++)
                   IPrivateVCT_Feature.IFeatureElement featureElement = wdContext.nodeFeature().getFeatureElementAt(i);
                   IWDTray featureTray = (IWDTray) view.createElement(IWDTray.class, featureElement.getName());
                   IWDCaption header = (IWDCaption) view.createElement(IWDCaption.class, featureElement.getName()+"_Header");
                   header.setText(featureElement.getName());
                   featureTray.setHeader(header);
                   featureTray.setExpanded(false);
                   rootContainer.addChild(featureTray);
                   IWDButton button = (IWDButton) view.createElement(IWDButton.class, featureElement.getName()+"_Button_AddElement");
                   IWDAction actionAddElement = wdThis.wdGetAddElementAction();
                   actionAddElement.getActionParameters().addParameter("featureIndex", new Integer(i).toString());
                   button.setOnAction(actionAddElement);
                   button.setText("Add Element");
                   featureTray.addChild(button);

    Hi Heiko,
    You have done everything correctly....except for 1 line
    in the code...
    Replace the following line in your code:
    actionAddElement.getActionParameters().addParameter("featureIndex", new Integer(i).toString());
    Replace the above line with this code:
    button.mappingOfOnAction().addParameter("featureIndex",i);
    Actually in your code, you are not associating the parameter with the button...
    Note that addParameter(...) comes with two signatures: addParameter(String param, String value) and addParameter(String param, int value). You can use any of them based on yuor need.
    Hope it helps,
    Thanks and Regards,
    Vishnu Prasad Hegde

  • Creating a dynamic grid using actionscript

    Hello all:
    I am working on a Flash project which requires that the user
    input 2 values. These two values will be used as height and width
    to generate a dynamic grid. I am new to actionscript and am
    struggling with how to create the 2 input fields and pass the
    values to actionscript by an event such as the user pressing
    return. The code below will create the grid correctly based upon
    the hardcoded variable values hightlighted, but I need the user to
    enter the values and press return to generate the grid.
    Can anyone suggest the actionscript required to capture the 2
    values, send them to actionscript with an event such as pressing
    return and then have AS generate the grid width and height based
    upon the user input. The i (10) and j (10) values in line 4 and 5
    are the values that I need to have the user input to generate the
    grid.
    Any help will be most appreciated!
    initX = 0;
    initY = 0;
    counter = 0;
    for (var i = 1; i<=10; i++) {
    for (var j = 1; j<=10; j++) {
    counter++;
    grid_container.attachMovie("cellMC", "cell"+counter,
    counter);
    grid_container["cell"+counter]._x = initX;
    grid_container["cell"+counter]._y = initY;
    grid_container["cell"+counter].onRelease = function() {
    cellName.text = this._name;
    initX += 30;
    initY += 30;
    initX = 0;

    Thanks for the quick reponse kglad. I will give it a
    go.

  • How to create an grid of buttons.

    Im trying to create a grid of buttons but for some reason i can see only 2 of them at the same time, but i know they are 9 on stage cause i trace numChildren
    Currently i have this:
    public class Main extends MovieClip
                        private var myBtn:SimpleButton = new SimpleButton();
                        private var img1:Bitmap=new Bitmap(new active_MouseOut());
                        private var img2:Bitmap=new Bitmap(new active_MouseOver());
                        private var img3:Bitmap=new Bitmap(new notActive_MouseOut());
                        private var img4:Bitmap=new Bitmap(new notActive_MouseOver());
                        private var myArrayContainer:Array = new Array();
                        public function Main()
                                  for (var i :int = 0; i < 3; i++)
                                            for (var j:int = 0; j < 3; j++)
                                                      myArrayContainer[j] = new MyButton(img1, img2, img3, img4)
                                                      myArrayContainer[j].x = 0 + i * (myArrayContainer[j].width + 10)
                                                      myArrayContainer[j].y = 0 + j * (myArrayContainer[j].height + 10)
                                                      this.addChild(myArrayContainer[j])
                                  trace(numChildren)
    active_MouseOut, active_MouseOver, notActive_MouseOut and notActive_MouseOver are simple bitmap Images that have AS linkage
    And MyButton class is this
    package
              import flash.display.Bitmap;
              import flash.display.MovieClip;
              import flash.display.SimpleButton;
              import flash.events.MouseEvent;
              import flash.utils.getDefinitionByName;
              public class MyButton extends MovieClip
                        private var myBtn:SimpleButton = new SimpleButton();
                        private var image1:Bitmap
                        private var image2:Bitmap
                        private var image3:Bitmap
                        private var image4:Bitmap
                        public function MyButton(active_OutState:Bitmap, active_OverState:Bitmap, notActive_OutState:Bitmap, notActive_OverState:Bitmap)
                                  image1 = active_OutState;
                                  image2 = active_OverState;
                                  image3 = notActive_OutState;
                                  image4 = notActive_OverState
                                  myBtn.upState = image1;
                                  myBtn.overState = image2;
                                  myBtn.downState = myBtn.upState;
                                  myBtn.hitTestState = myBtn.overState;
                                  addChild( myBtn );
                                  myBtn.addEventListener(MouseEvent.CLICK, onClick);
                        private function onClick( ev:MouseEvent ):void
                                  myBtn.upState = image3;
                                  myBtn.overState = image4;
    I also want to ask : Can I get the bitmapData to load in the MyButton class with this
    private var image1:Bitmap
    public function MyButton(mouseState:String)
                                   image1_Data = Class(getDefinitionByName( mouseState ));
                                  image1 = new Bitmap( image1_Data() )
    and in the Main Class to send the name of the image in the library
    myArrayContainer[j] = new MyButton( "notActive_MouseOver" )
    or I can do this only in/from the Document Class
    cause Im trying and it is giving me this
    Error #1065: Variable notActive_MouseOver() is not defined.

    well Im doing the button-making in the MyButton class cause im trying to create 9 buttons(and every button has a different image and that image has 4 states(clickable-Up, clickable-Over, notClickable-Up, notClickable-Over  )).
    And this is the only way i figured out how to do it without writing alot of code ()

  • Help Creating a Dynamic Grid?

    I have some experience in flash and actionscript, but not much beyond the classroom in a book tutorials, etc.
    I am working on an idea and just need a little help figuring out where to begin.
    I would like to create a simple 2D interactive grid.  The user should be able to increase and decrease the number of axis (both X and Y simultaneously) that compose the grid, and also the scale of the grid itself (Zoom in and Out).
    If this goes well enough, I would like to be able to plot graphical content on the grid that visually changes as the grid itself changes.  They should, in some way, be linked to one another and correspondingly affected by the same two parameters.  This, however, would be a second step.  I am more concerned with the base grid model at this point.
    ANY help would be very much appreciated!

    It is not clear from your post what exactly you need to do. Perhaps some visual (simple image) will help us understand your vision and use cases.
    Meanwhile, I have a post on my blog about how to compose dynamic grid:
    http://flashascript.wordpress.com/2010/12/25/arranging-objects-into-2d-dynamic-grid-with-a ctionscript-3/
    The same principals can be applied to drawing other grid related visuals.

  • How to call a dynamic URL on 'button press' event, in MVC-based BSP

    Hi,
    My requirement is as below:
    On selecting a row in table view, and pressing a button, I need to open a browser.
    The Browser URL depends on the row selected.
    The key field from table view, is added at the end of the URL string.
    Shortly, I can say that, I am getting a value on row selection & want to pass it to button event.
    In Views Section, there are 2 tags- (1)table view & (2)button.
    Right now, I have put the code for getting the key field, in DO_HANDLE_DATA method.
    In Button's OnClientClick method, I have called the Javascript to open the browser.
    If I now write the code to concatenate the key field value to form the dynamic URL in 'OnClick' method,
    it will be called only after the browser is opened.
    (as OnClick event is executed only after OnClientClick event is executed)
    Could anyone please tell me what event (and in which tag) can be used to solve this.
    Is there any event which is triggered, as soon as the row is selected, &  before the button press event is triggered ?
    Would really appreciate responses made to this query.
    Thanks,
    Nisha Vengal.

    Hi Nisha,
    The crux of your issue here is that you want to call the event triggered with onClick before calling the event triggered on onClientClick. This can be achieved by the following code in the function called on the onClientClick.
    function fn_button()
               htmlbSL(this,2,'b_row_selection:onInputProcessing()');
               window.open("new_page",target="BLANK");
    Here, fn_button is the javascript function called on button click, and b_row_selection is the event triggered on the onClick event of row selection.
    Try this out and let us know if it works for you.
    Regards,
    Saurabh

  • Dynamic action on button click

    Hi:
    I need some help.
    I am trying to create a dynamic action on the click of a specific button.
    I have set the Event to 'click" and the Selection Type to "DOM Object", but I do not know how to reference the button. I am using a standard template button and #BUTTON_ATTRIBUTES# is not included in the template - I am not sure how to include it in order to be able to specify an id for the button.
    Can someone give me some guidance on the steps I msut take to implement a dynamic action on the click of a button.
    Thanks.
    Bruce

    Bruce,
    edit your button template and add #BUTTON_ATTRIBUTES# to the button-tag of your button
    e.g.
    <button value="#LABEL#" onclick="#LINK#" class="button-gray" type="button" #BUTTON_ATTRIBUTES#>
    <span>#LABEL#</span>
    </button>
    brgds,
    Peter
    Blog: http://www.oracle-and-apex.com
    ApexLib: http://apexlib.oracleapex.info
    BuilderPlugin: http://builderplugin.oracleapex.info
    Work: http://www.click-click.at

  • Computer shuts down when I click on the list or grid display button

    I've uninstalled an reinstalled 3 times and instead of the computer shutting down when I start itunes as it was doing, it only does it when I click on the display as a list, grid or cover display button. However it seems to unistall some parts at the same time as I can't open it all afterwards (error message says its not installed). This started to occur after a couple of weeks of non use and when I last used it I purchased songs from itunes. I now have current version but didn't when it first statred to happen. Help!!

    Okay ... we'd better have a closer look at the minidumps the PC has been producing to see if they can turn up any additional information on what we're dealling with here.
    Open "My Computer", and see if you can find a directory called C:\Windows\Minidump. (That's where minidumps usually go on a PC, so long as the Systemroot hasn't been set to some other folder.)
    If it's been collecting minidumps, there should be files in there with names like "Mini(number-numbers).dmp"
    (If you have "Hide filename extensions for known file types" enabled in Windows, the ".dmp" extension may not appear on the dump files. The numbers in the file name will be different for each minidump, if minidumps are present.)
    Once we've tracked down some minidumps, we can have a go at analysing them.
    1. Download and install the Windows debugging tools from here:
    http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx
    2. Go to Start, All Programs, Debugging Tools For Windows, Windbg
    Once you open Windbg, you will presented with a blank screen.
    3. Click on "File > Symbol File Path". Here you will enter the symbols
    path. Symbols are needed to effectively debug.
    The path will be:
    SRVc:symbolshttp://msdl.microsoft.com/download/symbols
    4. Enter in this path and click OK. Now, go to "File > Save Workspace"
    so that your symbols path is saved for future use.
    5. Go to "File > Open Crash Dump" and load the file.
    (An "Open Crash Dump" screen will appear ... doubleclick "My Computer", doubleclick "Local Disk", doubleclick "Windows", doubleclick "Minidump", and doubleclick on one of the minidumps in there.)
    You will/should get a message to save base workspace information. Choose no.
    Now you will get a debugging screen. It takes a little bit to run it,
    as the symbols have to be downloaded as they are needed.
    After the "bugcheck analysis" part of the screen comes up, look for the component that seems to be causing the crash. (It'll say "Probably caused by" ...)
    Let us know the precise name of the component. (Include any file name extensions like .dll or .sys.)
    If you can, have a look at several of your crash dumps. Are all the crashes being caused by the same component? If not, could you let us know the names of the various components being cited in the various crash dumps?

  • How to move a selected row data from one grid to another grid using button click handler in flex4

    hi friends,
    i am doing flex4 mxml web application,
    i am struck in this concept please help some one.
    i am using two seperated forms and each form having one data grid.
    In first datagrid i am having 5 rows and one button(outside the data grid with lable MOVE). when i am click a row from the datagrid and click the MOVE button means that row should disable from the present datagrid and that row will go and visible in  the second datagrid.
    i dont want drag and drop method, i want this process only using button click handler.
    how to do this?
    any suggession or snippet code are welcome.
    Thanks,
    B.venkatesan.

    Hi,
    You can get an idea from foolowing code and also from the link which i am providing.
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
    width="613" height="502" viewSourceURL="../files/DataGridExampleCinco.mxml">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    import mx.binding.utils.BindingUtils;
    [Bindable]
    private var allGames:ArrayCollection;
    [Bindable]
    private var selectedGames:ArrayCollection;
    private function initDGAllGames():void
    allGames = new ArrayCollection();
    allGames.addItem({name: "World of Warcraft",
    creator: "Blizzard", publisher: "Blizzard"});
    allGames.addItem({name: "Halo",
    creator: "Bungie", publisher: "Microsoft"});
    allGames.addItem({name: "Gears of War",
    creator: "Epic", publisher: "Microsoft"});
    allGames.addItem({name: "City of Heroes",
    creator: "Cryptic Studios", publisher: "NCSoft"});
    allGames.addItem({name: "Doom",
    creator: "id Software", publisher: "id Software"});
    protected function button1_clickHandler(event:MouseEvent):void
    BindingUtils.bindProperty(dgSelectedGames,"dataProvider" ,dgAllGames ,"selectedItems");
    ]]>
    </mx:Script>
    <mx:Label x="11" y="67" text="All our data"/>
    <mx:Label x="10" y="353" text="Selected Data"/>
    <mx:Form x="144" y="10" height="277">
    <mx:DataGrid id="dgAllGames" width="417" height="173"
    creationComplete="{initDGAllGames()}" dataProvider="{allGames}" editable="false">
    <mx:columns>
    <mx:DataGridColumn headerText="Game Name" dataField="name" width="115"/>
    <mx:DataGridColumn headerText="Creator" dataField="creator"/>
    <mx:DataGridColumn headerText="Publisher" dataField="publisher"/>
    </mx:columns>
    </mx:DataGrid>
    <mx:FormItem label="Label">
    <mx:Button label="Move" click="button1_clickHandler(event)"/>
    </mx:FormItem>
    </mx:Form>
    <mx:Form x="120" y="333">
    <mx:DataGrid id="dgSelectedGames" width="417" height="110" >
    <mx:columns>
    <mx:DataGridColumn headerText="Game Name" dataField="name" width="115"/>
    <mx:DataGridColumn headerText="Creator" dataField="creator"/>
    <mx:DataGridColumn headerText="Publisher" dataField="publisher"/>
    </mx:columns>
    </mx:DataGrid>
    </mx:Form>
    </mx:Application>
    Link:
    http://social.msdn.microsoft.com/Forums/en-US/winformsdatacontrols/thread/ae9bee8d-e2ac-43 c5-9b6d-c799d4abb2a3/
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

Maybe you are looking for

  • No Messages in Mail.App

    Can anyone help me? For the last 2 days, I have been getting the red notification symbol in the dock icon, but when I click on it, there are no messages there. I have then had to go to my .Mac account on Safari to see them. Please cam you tell me wha

  • Error 1402 while installing iTunes.

    Hey guys, I have a problem with installing iTunes, and I've come to believe it's called "error 1402". Here is what it looks like: I have no idea how to fix it, and the solution Apple provides didn't help me.

  • Debugging of standard transaction(screens)

    Hi,   How can I debug standard transactions and screens.   I have program name and screen number. How can I go ahead for debugging. Regards Sasi

  • Is possible to assign picture in paragraph style or create bullet?

    I need to  assign Illustrator picture (B&W) before text. Is this possible? Or exist way, how to create from this pictue bullet? Thanks

  • Is it possible to combine SDN account into OSS account?

    Hi Friends,    I had a SDN account and now I got my OSS account.when I want to go to http://sdn.sap.com and I will login this forum with my OSS account automatically. It seems it is because of my setting of SAP Passport in my OSS profile. It is not s