-
21 Nov 2011 10:38 PM #1
What happen? I couldn't align on title.
What happen? I couldn't align on title.
스크린샷 2011-11-22 오후 3.32.04.png스크린샷 2011-11-22 오후 3.32.20.png
like that. title didnt place to center bcoz buttons... sorry for my bad english.
-
22 Nov 2011 1:03 AM #2
Hi if you want precise management of title positioning, then I would suggest not using the title configuration but use an item of type title in your toolbar items, e.g.
This way you can control title positioning much more accurately.Code:{ xtype: 'toolbar', items: [ { xtype: 'button', iconCls: 'refresh' iconMask: true }, { xtype: 'spacer' width: 50, }, { xtype: 'title', html: 'ABCD' }, { xtype: 'spacer' }, { xtype: 'button', iconCls: 'add', iconMask: true } ] }--
Rahul Singla
-
22 Nov 2011 5:50 AM #3
-
22 Nov 2011 10:30 AM #4
We actually made a component which does exactly what you want.
http://docs.sencha.com/touch/2-0/#!/....NavigationBarSencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
22 Nov 2011 1:59 PM #5
--
Rahul Singla
-
22 Nov 2011 4:19 PM #6
The title configuration is always centered, no mater what other content you have in there. you can also give items of a NavigationBar an 'align' configuration of left/right which will dock them to the left/right.
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
22 Nov 2011 10:38 PM #7
Thanks, I wonder did we really needed a component when the same was easily achievable with items. Moreover, the Toolbar title configuration can be enhanced to accept a string or an object. For string, it would be centrally aligned like we have today and for object, well whatever the object says.
--
Rahul Singla
-
9 Feb 2012 10:01 AM #8
Navigationbar still available or no?
Navigationbar still available or no?
Hi,
Wondering if Navigationbar is off-limits? I noticed it is a private member of Navigationview and the link posted above is dead.
Dan
-
11 Feb 2012 12:26 PM #9
This 'navigation bar' was renamed to 'TitleBar'. You can view it in the documentation here: http://docs.sencha.com/touch/2-0/#!/api/Ext.TitleBar
Sencha Inc.
Robert Dougan - @rdougan
Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.
-
12 Feb 2012 12:45 AM #10
It seems now its broken other way around - I can't align title to the right or to the left. Tried on NestedList and Panel components - no luck.
Because of some reason title is always placed in x-centered div, making any alignment other than center impossible.
Can someone provide a working example of toolbar with title aligned to, let's say, to the left?
p.s. Okay, figured that out. I have to create Title manually, like this:
Any attempt to specify 'title' variable outside of 'title' xtype will force automatic title creation, and its alignment to the center. This approach will work on Panel, but with NestedList it will cause creation of two titles simultaneously. Thus, if its possible to align title in NestedList is still unclear.Code:items:[ { xtype: 'toolbar', docked: 'top', items: [ { xtype: 'title', title: 'My title' } ] }]


Reply With Quote