x11 Posted February 5 Share Posted February 5 вот другое количество вкладок Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 5 Share Posted February 5 27 minutes ago, Sherzod said: Я кое-что добавил. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 5 Share Posted February 5 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(); } } }); } 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted February 5 Share Posted February 5 1 hour ago, Sherzod said: _innerPanel.setY(_dHeight + _heights + 10); пришлось добавить здесь еще 20 пикселей, я забьіл, что сетка использует ToolBottons Спасибо большое за помощь 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted February 5 Share Posted February 5 Как я уже писал ранее, к сожалениию, у сетки uniDBGrid отсутствует свойство Layout, приходится использовать Align := alClient Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 6 Share Posted February 6 14 hours ago, x11 said: у сетки uniDBGrid отсутствует свойство Layout Ну, uniDBGrid же не контейнер. Quote Link to comment Share on other sites More sharing options...
x11 Posted February 6 Share Posted February 6 Ок, а как правильно растянуть uniDBGrid на всю область родительского контейнера, не используя сервервеную Align := alClient? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 6 Share Posted February 6 Мы уже устанавливали с Вами layout = 'fit' у контейнера. Quote Link to comment Share on other sites More sharing options...
x11 Posted February 6 Share Posted February 6 ААА, я протупил - я в тестовом проекте сделал, а в рабочем проекте в итоге забьіл 🫠 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.