Results 1 to 7 of 7

Thread: problem with togglefield

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default problem with togglefield

    Thanks to support me.

    I have one problem with togglefield.

    I create one togglefield and button in one panel.

    Then i make other panel in handler of button.

    problem is that when i click on button togglefield is still present in this panel.
    But i don't code of togglefield in this panel so why it still present.
    How i can prevent it to show in other panel.
    Remember i require togglefield in only first pannel not in other pannel.
    I search lots but i can't find any solution.
    So pls help me to solve it.

  2. #2
    Sencha User
    Join Date
    Jul 2010
    Location
    Switzerland
    Posts
    78

    Default

    some code would definitely help in debugging your problem

  3. #3

    Default

    Thanks for reply,

    this is my demo code:
    <code--------------------------------------->

    Ext.setup({
    tabletStartupScreen: 'tablet_startup.png',
    phoneStartupScreen: 'phone_startup.png',
    icon: 'icon.png',
    glossOnIcon: false,
    onReady: function() {

    var rootform=new Ext.form.FormPanel({
    fullscreen: true,
    items: [
    {
    xtype:"togglefield",
    label:"TogleField"
    },
    {
    xtype:"button",
    text:"Click me",
    handler: function(){
    var childform=new Ext.Panel({
    fullscreen: true,
    items: [
    {
    html:"I m in new panel"
    }]
    });
    }
    }]
    });



    }
    });



    </code-------------------------------------------->
    togglefield also see in other panel
    Pls check it and then reply

  4. #4
    Sencha User
    Join Date
    Jul 2010
    Location
    Switzerland
    Posts
    78

    Default

    You can't just slap a new fullscreen panel over an old panel. At least call rootform.hide() in your button handler. But maybe you better set up a viewport with a card layout and start switching cards in your button handlers. At least if things get any more sophisticated than this.

  5. #5

    Default

    thanks for reply .
    can u tell me how i can handle this example using viewport()

  6. #6
    Sencha User
    Join Date
    Jul 2010
    Location
    Switzerland
    Posts
    78

    Default

    Maybe switching over to an MVC-style application is an option for you. If it is, there is a nice tutorial in the learn section and there are bundled examples with the sencha touch download.
    If not, just create a simple viewport panel with a card layout, set it to fullscreen and use that as a wrapper panel for any other content.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •