-
2 Jul 2010 12:57 PM #1
"Popover" question
"Popover" question
Hi All,
I see in the Kitchen Sink example when you are in portrait mode the left navigation is hidden and made visible via the Navigation button. When this button is clicked the navigation panel becomes visible in a floating panel that has the little "arrow" at the top like the popover element in the iPad SDK.
How can I take advantage of this interface element in my code? I would like to be able to have the "arrow" on the top, bottom, or either side so I can refer to an object underneath.
Is this even possible and if so how would I accomplish this?
Thanks for all of your help!
gt
-
2 Jul 2010 1:06 PM #2Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 5
You can make a component look like an overlay by setting floating: true on it. Make sure you give it a width and a height. Then you can use showBy on that component and pass an element or component (for example a button). This will automatically position it in a way that it fits on the screen and position the arrow for you to point towards the right place. It currently only supports the array to be on the top or bottom.
-
3 Jul 2010 1:19 PM #3
Thanks Tommy! That worked but now I have a new anomaly. What I have is an overlay that takes up most of the screen while dimming the page behind it. I added the "popover" overlay to an element on the underlying overlay which works just fine. However if I tap outside of the underlying overlay it hides itself as expected but if my "popover" overlay happens to be visible at the time it remains visible. Is there a way I can close the "popover" overlay whenever the underlying overlay is closed?
Hopefully this makes sense!
Thanks,
gt
-
5 Jul 2010 1:44 PM #4Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 5
Try setting hideOnMaskTap: true on the component.
-
5 Jul 2010 2:10 PM #5
Hi Tommy,
I just added the hideOnMaskTap to the "popover" overlay and still when I dismiss the underlying overlay by tapping on the mask on the mainPanel of my app my "popover" overlay still shows until I tap again.
Here is the code for the underlying overlay that is displayed over the mainPanel:
and here is the code for the "popover" overlay that is displayed on top of the overlay:Code:var overlay = new Ext.Panel({ floating: true, modal: true, centered: true, styleHtmlContent: true, contentEl: 'note1L', cls: 'htmlcontent' });
Maybe you can see something wrong with my code.Code:var testPop = new Ext.Panel({ floating: true, hidden: true, width: 200, height: 200, hideOnMaskTap: true, styleHtmlContent: true, html: 'This is a test of a popup', cls: 'htmlcontent' });
Thanks for all of your help.
gt
-
6 Jul 2010 9:48 AM #6Sencha - Sencha Touch Dev Team
- Join Date
- Mar 2007
- Location
- Haarlem, Netherlands
- Posts
- 1,235
- Vote Rating
- 5
Oh, I only realized now that you are talking about having two popups open at the same time.
You could listen for the 'hide' event of the one popup and programmatically call hide() of the other maybe?
-
19 Dec 2011 1:55 AM #7
How to dismiss the popover on a button tap
How to dismiss the popover on a button tap
thank you tommy and thomson.
I tried the same thing and it worked perfectly for me. But Now I have a "Cancel" button that should remove the popover as soon as clicked.
How to dismiss the popover on Cancel button tap.
thank you
-
16 Mar 2013 7:41 AM #8
As this post points out, sencha have very exactly what you need.
Try this :
Code:new Ext.Panel({ fullscreen : true, items : [ { xtype : 'toolbar', docked : 'top', items : [ { text : 'Open', handler : function (button) { var panel = new Ext.Panel({ height : 200, width : 200, html : 'Hello' }); panel.showBy(button, 'tr-bc?'); } } ] } ]});
Similar Threads
-
[CLOSED][3.0] SetValue shows "valueField" instead of "displayField". mode "local".
By galdaka in forum Ext 3.x: BugsReplies: 3Last Post: 28 Oct 2009, 6:38 AM -
replace the "south" with the "new Ext.StatusBar" in "layout:'border'"
By ealpha in forum Ext 2.x: Help & DiscussionReplies: 1Last Post: 18 May 2008, 8:28 PM -
Question about "load" and "layout"
By gamma in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 6 May 2008, 10:49 AM -
How to generate the file "ext-all" from multiple file "myField.js", "myForm.js", etc.
By steph04 in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 29 Feb 2008, 5:35 AM


Reply With Quote
