View Full Version : problem with togglefield
manish khamar
29 Aug 2011, 9:35 PM
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.:(
fx-mike
30 Aug 2011, 1:31 AM
some code would definitely help in debugging your problem
manish khamar
30 Aug 2011, 1:42 AM
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
fx-mike
30 Aug 2011, 1:53 AM
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.
manish khamar
30 Aug 2011, 1:58 AM
thanks for reply .
can u tell me how i can handle this example using viewport()
fx-mike
30 Aug 2011, 2:07 AM
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.
manish khamar
30 Aug 2011, 2:09 AM
thanks for reply..
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.