降低标题栏的高度 - Sencha [英] Reduce the height of a titlebar - Sencha

查看:131
本文介绍了降低标题栏的高度 - Sencha的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个容器有几个不同的物品堆放在我也想要在容器中有两个标题栏,高度减少到10点。我已经尝试使用较小的数字的setHeight()来减小大小,但我似乎无法实现。我错过了什么吗?



有没有办法可以减少Sencha Touch中工具栏/标题栏的高度?帮助!



更新:这是我用于工具栏的代码...

 code> Ext.define('MyApp.view.CookingSteps',{
extends:'Ext.Container',
alias:'widget.CookingSteps',

config:{
height:'',
html:'',
id:'CookingSteps',
itemId:'CookingSteps',
style:''
layout:{
type:'vbox'
},
items:[
{
xtype:'toolbar',
docked: '顶部'
高度:50,
html:'< b>< center> AdBanner Goes Here',
style:'background:gray;',
styleHtmlContent :true
},
{
xtype:'container'
},
{
xtype:'fieldset',
标题:'',
items:[
{
xtype:'textfield',
label:'',
placeHolder:'Username'
} ,
{
xtype:'textfield',
label:'',
placeHolder:'Passphrase'
}
]
}
{
xtype:'toolbar',
docked:'top',
height:20,
minHeight:'20',
title:'登录'
},
{
xtype:'container',
items:[
{
xtype:'button',
:true,
ui:'con公司',
宽度:283,
文本:'向前走:)'
}
]
}
]
}

});

我希望工具栏的标题为登录,减少高度..任何帮助将不胜感激。先谢谢你。 :

解决方案

如果您需要使用工具栏配置中的单位调整工具栏大小,请使用minHeight选项。这是一个具有当前字体大小的2x的工具栏示例。

  {
xtype:'toolbar',
停靠:'顶',
minHeight:'2em',
}


I have a container with a few different items stacked in. I also would like to have two title bars inside the container BUT with height reduced to 10 points. I have tried to reduce the size using setHeight() with a lesser number but I can't seem to achieve that. Am I missing something obvious?

Is there a way I can reduce the height of a toolbar/titlebar in Sencha Touch? Help!

UPDATE: Here is the code I use for a toolbar...

Ext.define('MyApp.view.CookingSteps', {
    extend: 'Ext.Container',
    alias: 'widget.CookingSteps',

    config: {
        height: '',
        html: '',
        id: 'CookingSteps',
        itemId: 'CookingSteps',
        style: '',
        layout: {
            type: 'vbox'
        },
        items: [
            {
                xtype: 'toolbar',
                docked: 'top',
                height: 50,
                html: '<b><center>AdBanner Goes Here',
                style: 'background: gray;',
                styleHtmlContent: true
            },
            {
                xtype: 'container'
            },
            {
                xtype: 'fieldset',
                title: '',
                items: [
                    {
                        xtype: 'textfield',
                        label: '',
                        placeHolder: 'Username'
                    },
                    {
                        xtype: 'textfield',
                        label: '',
                        placeHolder: 'Passphrase'
                    }
                ]
            },
            {
                xtype: 'toolbar',
                docked: 'top',
                height: 20,
                minHeight: '20',
                title: 'Login'
            },
            {
                xtype: 'container',
                items: [
                    {
                        xtype: 'button',
                        centered: true,
                        ui: 'confirm',
                        width: 283,
                        text: 'Go Ahead :)'
                    }
                ]
            }
        ]
    }

});

I want the toolbar with title 'Login' with a reduce height.. Any help would be greatly appreciated. Thank you in advance. :)

解决方案

If you need to adjust toolbar size use minHeight option with units in toolbar config. Here is a toolbar example with a 2x of current font size height.

    {
        xtype: 'toolbar',
        docked: 'top',
        minHeight: '2em',
    }

这篇关于降低标题栏的高度 - Sencha的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆