-
Sencha User
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.
-
Sencha User
some code would definitely help in debugging your problem
-
Sencha User
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
-
Sencha User
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.
-
Sencha User
thanks for reply .
can u tell me how i can handle this example using viewport()
-
Sencha User
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.
-
Sencha User
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules