This discussion is archived
1 Reply Latest reply: Jul 3, 2013 10:50 AM by CraigB RSS

open different forms in one Frame

The Learner Newbie
Currently Being Moderated

i,

 

I want to display different forms in one Frame/ canvas.

when I press button Inventory then In the frame/canvas it should display Inventory form in the frame.

If i press Employee it should display Employee form in frame... like that.

 

 

There is any possibility...

Please tell me the steps.

Please help me...

 

 

Thanks & regards

The Leaner

  • 1. Re: open different forms in one Frame
    CraigB Guru
    Currently Being Moderated

    There is any possibility...

    Please tell me the steps.

    Please help me...

    Yes, this is possible and can be accomplished using Stacked Canvases.  Start with a primary canvas.  Now add the data blocks to hold your "Inventory" and "Employee" data.  With Stacked Canvases, I find it easier to draw the stacked canvas on the primary canvas over using the Layout Wizard.  By drawing the stacked canvas on your primary canvas, it sets the visual related properties for you ( eg; Viewport X/Y Postitions, Viewport Height/Width, etc).  Now that you have your stacked canvas in the location you want, right-click on the data block of the items you want displayed in this first stacked canvas and select the "Layout Wizard."  Go through the wizard to to assign the items in your datablock to the canvas.  Next, right-click on the remaining data block and select the "Layout Wizard" again.  This time, when you are prompted to select the canvas to display the items from your data block, select a new canvas and set the type to "Stacked."  Using the visibility properties of the first stacked canvas as a guide, now set the properties of your new stacked to match those of your first stacked canvas.  Completing these steps just completes the layout of your items.  Now you will need to write some code to display your stacked canvases in the correct order.  This is done with the SHOW_VIEW and HIDE_VIEW built-ins as well as the GO_BLOCK or GO_ITEM built-ins.  For example, you want to display the Inventory or Employee stacked canvases when a user clicks a button.  The following is a sample of the code you would write in the When-Button-Pressed trigger.

     

    /* Sample When-Button-Pressed for Inventory button */
    BEGIN
       --Assumes the Employee Stacked Canvas is currently visible.
       Hide_View('EMP_CANVAS');
       Show_View('INV_CANVAS');
       Go_Block('INVENTORY');
    END;

     

    Hope this helps.

    Craig...

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points