Jump to content

TUniPageControl отображения вкладок без кнопок прокрутки


OlegTimkiv

Recommended Posts

function afterrender(sender, eOpts) 
{
    function getAllParentsOfType(component, parentType) {
        var parents = [];
        var heights = 0;

        function findParent(cmp) {
            var parent = cmp.up(parentType);
            if (parent) {
                parents.push(parent);
                findParent(parent);
                if (parent.xtype === 'tabpanel') {
                    heights += parent.tabBar.getHeight();
                    heights += parent.down('toolbar').getHeight();
                }
            }
        }

        findParent(component);
        return heights;
    };
    sender.add({
        xtype: 'toolbar',
        dock: 'top',
        layout: {
            type: 'column'
        },
        items: [
            sender.segmentedTabs
        ],
        listeners: {
            resize: function() {
                var _sHeight = sender.segmentedTabs.getHeight();
                //var _dHeight = _sHeight - sender.tabPanel.tabBar.getHeight();
                var _dHeight = _sHeight + sender.tabPanel.tabBar.getHeight();
                var _innerPanel = sender.innerPanel;
                //_innerPanel.setBodyStyle('top', _dHeight + 'px');
                //_innerPanel.setBodyStyle('height', (_innerPanel.getHeight() - _dHeight) + 'px');
                
                var _heights = getAllParentsOfType(sender, 'panel');
                _innerPanel.setY(_dHeight + _heights + 10);
                sender.updateLayout();
            }
        }
    });
}

 

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Sherzod said:
_innerPanel.setY(_dHeight + _heights + 10);

 

пришлось добавить здесь еще 20 пикселей, я забьіл, что сетка использует  ToolBottons

Спасибо большое за помощь

image.png

  • Thanks 1
Link to comment
Share on other sites

Как я уже писал ранее, к сожалениию, у сетки uniDBGrid отсутствует свойство Layout, приходится использовать Align := alClient

Link to comment
Share on other sites

Ок, а как правильно растянуть uniDBGrid на всю область родительского контейнера, не используя сервервеную Align := alClient?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...