Patrick1968 Posted October 13, 2021 Share Posted October 13, 2021 Добрый день. Подскажите, пожалуйста, как и какими параметрами изменить размер меню, размер шрифтов, цвет шрифтов и фона и т.д. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 13, 2021 Share Posted October 13, 2021 Здравствуйте, В предыдущем посте, не проанализировали ссылку, которую давал? Quote Link to comment Share on other sites More sharing options...
Patrick1968 Posted October 14, 2021 Author Share Posted October 14, 2021 Добрый день. Я так понял имеется ввиду следующее procedure TMainForm.UniFormReady(Sender: TObject); begin with TXPopupMenu(UniPopupMenu1).MenuControl.JSInterface do begin JSConfig('cls', ['test']); JSConfig('bodyCls', ['test1']); JSConfig('disabledCls', ['test2']); JSConfig('headerOverCls', ['test3']); JSConfig('iconCls', ['test4']); JSConfig('overCls', ['test5']); end; end; мне не понятно test,test1,test2.... это что за параметры? например JSConfig('disabledCls', ['test2']); я так понял это конфигурация для запрещенных позиций в меню, а test2 это что? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 14, 2021 Share Posted October 14, 2021 Добрый день, 3 minutes ago, Patrick1968 said: test2 Имя пользовательского класса (CSS). Quote Link to comment Share on other sites More sharing options...
x11 Posted October 19, 2021 Share Posted October 19, 2021 Т.е. если использовать код: JSConfig('disabledCls', ['test2']); то в CSS нужно менять/назначать свойства класса для test2, я правильно понял? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 19, 2021 Share Posted October 19, 2021 Just now, x11 said: то в CSS нужно менять/назначать свойства класса для test2, я правильно понял? Да. Quote Link to comment Share on other sites More sharing options...
Patrick1968 Posted October 22, 2021 Author Share Posted October 22, 2021 Добрый день. Вернулся к теме. А первый параметр - приблизительно понятно что это из названия. Только ведь наверное разный для каждого типа классов, для Menu - один, для Groupbox другой - их можно где-то посмотреть? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 22, 2021 Share Posted October 22, 2021 Добрый день, 26 minutes ago, Patrick1968 said: А первый параметр - приблизительно понятно что это из названия. Только ведь наверное разный для каждого типа классов, для Menu - один, для Groupbox другой - их можно где-то посмотреть? Простите, не понял. Quote Link to comment Share on other sites More sharing options...
Patrick1968 Posted October 22, 2021 Author Share Posted October 22, 2021 Речь идет про JSConfig и первый параметр Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 22, 2021 Share Posted October 22, 2021 2 minutes ago, Patrick1968 said: Речь идет про JSConfig и первый параметр Полный список конфигов и не только: https://docs.sencha.com/extjs/7.0.0/classic/Ext.html Quote Link to comment Share on other sites More sharing options...
Patrick1968 Posted October 22, 2021 Author Share Posted October 22, 2021 попробовал вот так TXPopupMenu(pmMain).MenuControl.JSInterface.JSConfig('cls',['.x-menu-list-item']); итог - ошибка Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 22, 2021 Share Posted October 22, 2021 12 minutes ago, Patrick1968 said: Скорее всего используете OnCreate событие формы. В нашем случае, должны использовать OnReady: On 10/14/2021 at 11:37 AM, Patrick1968 said: TMainForm.UniFormReady Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 22, 2021 Share Posted October 22, 2021 14 minutes ago, Patrick1968 said: ['.x-menu-list-item'] Имя класса без точки (.) Quote Link to comment Share on other sites More sharing options...
Patrick1968 Posted October 22, 2021 Author Share Posted October 22, 2021 Сделал так: TXPopupMenu(pmMain).MenuControl.JSInterface.JSConfig('cls',['x-menu-list-item']); В CustomCSS .x-menu-list-item { font-size: 20px;} Ошибок нет но и размер шрифта не устанавливает 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.