turan Posted August 24, 2018 Posted August 24, 2018 Доброе время суток! Столкнулся с проблемой переноса текста в свойстве Caption у объекта UniButton. Текст с большим размером не переносится и получается, что не влезает в рамки кнопки. Свойство WordWrap у кнопки не нашел. Как быть? Quote
Sherzod Posted August 24, 2018 Posted August 24, 2018 Добрый день, Одно из возможных решений: 1. UniServerModule -> CustomCSS: .wordwrapbtn .x-btn-button { white-space: normal; text-align: center; } 2. UniButton -> ClientEvents -> UniEvents -> function beforeInit: function beforeInit(sender, config) { config.cls='wordwrapbtn' } Quote
turan Posted August 24, 2018 Author Posted August 24, 2018 Добрый день, Одно из возможных решений: 1. UniServerModule -> CustomCSS: .wordwrapbtn .x-btn-button { white-space: normal; text-align: center; } 2. UniButton -> ClientEvents -> UniEvents -> function beforeInit: function beforeInit(sender, config) { config.cls='wordwrapbtn' } сделал как написано. Появляется ошибка: Ajax error missing { before function body Quote
Sherzod Posted August 24, 2018 Posted August 24, 2018 2. UniButton -> ClientEvents -> UniEvents -> function beforeInit: function beforeInit(sender, config) { config.cls='wordwrapbtn' } Проверьте еще раз Quote
turan Posted August 24, 2018 Author Posted August 24, 2018 Проверьте еще раз Проверил, все равно выдает ошибку. Заметил то что если добавить любое событие в UniEvents, выдает такую ошибку Quote
turan Posted August 24, 2018 Author Posted August 24, 2018 пробовал сделать сортировку грида на клиентской стороне, как это описано в статье http://forums.unigui.com/index.php?/topic/6225-dbgrid-clientside-sorting/, также аналогично падает ошибка Quote
Sherzod Posted August 24, 2018 Posted August 24, 2018 Можете сделать тестовый случай и прикрепить здесь? Quote
turan Posted August 24, 2018 Author Posted August 24, 2018 Какую сборку используете? сборка FMSoft_uniGUI_Complete_Professional_1.50.0.1476. Quote
turan Posted August 24, 2018 Author Posted August 24, 2018 попробовал тестовый проект накидать, запустил и все норм работает. Странно в чем проблема ... Quote
turan Posted August 24, 2018 Author Posted August 24, 2018 тестовый проект https://yadi.sk/d/YyrRWifW3aXKkV Quote
turan Posted August 24, 2018 Author Posted August 24, 2018 Нашел причину, конфликт с вызовом локализации текста на фрейме Quote
turan Posted August 24, 2018 Author Posted August 24, 2018 Добрый день, Одно из возможных решений: 1. UniServerModule -> CustomCSS: .wordwrapbtn .x-btn-button { white-space: normal; text-align: center;} 2. UniButton -> ClientEvents -> UniEvents -> function beforeInit: function beforeInit(sender, config){ config.cls='wordwrapbtn'} Спасибо за решение Quote
Kenneth Posted January 13, 2020 Posted January 13, 2020 Добрый день почему то для мобильной версии, т.е. для TUnimButton данный вариант не срабатывает. Не подскажите почему? Quote
Sherzod Posted January 13, 2020 Posted January 13, 2020 1 hour ago, Kenneth said: Добрый день почему то для мобильной версии, т.е. для TUnimButton данный вариант не срабатывает. Не подскажите почему? Здравствуйте, Попробуйте этот CustomCSS: .wordwrapbtn .x-text-el { white-space: normal; text-align: center; } Quote
Kenneth Posted January 13, 2020 Posted January 13, 2020 3 minutes ago, Sherzod said: Здравствуйте, Попробуйте этот CustomCSS: .wordwrapbtn .x-text-el { white-space: normal; text-align: center; } Спасибо! Сработало. Quote
Kenneth Posted January 13, 2020 Posted January 13, 2020 Теперь не могу изменить свойство в TUnimEdit. Хочу сделать чтобы текст был по центру. Добавил в CustomCSS: .editCenter { text-align: center; } Не работает. .editCenter <вот сюда что писать для TUnimEdit?>{ text-align: center; } Quote
Kenneth Posted January 13, 2020 Posted January 13, 2020 Все разобрался: .editCenter .x-input-el { text-align: center; } Quote
artem_niko Posted May 4, 2022 Posted May 4, 2022 On 8/24/2018 at 5:02 PM, Sherzod said: Добрый день, Одно из возможных решений: 1. UniServerModule -> CustomCSS: .wordwrapbtn .x-btn-button { white-space: normal; text-align: center; } 2. UniButton -> ClientEvents -> UniEvents -> function beforeInit: function beforeInit(sender, config) { config.cls='wordwrapbtn' } Greetings! It seems that the solution is suitable, but for some reason I have too much space between the line in the button title. Wrapping is in progress, but how to reduce the line spacing? Like this: Quote
Sherzod Posted May 4, 2022 Posted May 4, 2022 Hello @artem_niko I couldn't reproduce. 1 hour ago, artem_niko said: 1. UniServerModule -> CustomCSS: .wordwrapbtn .x-btn-button { white-space: normal; text-align: center; } 2. UniButton -> ClientEvents -> UniEvents -> function beforeInit: function beforeInit(sender, config) { config.cls='wordwrapbtn' } Works for me: Quote
artem_niko Posted May 4, 2022 Posted May 4, 2022 2 minutes ago, Sherzod said: Hello @artem_niko I couldn't reproduce. Works for me: Ok...maybe this is bug in UniFSComponents from @Marlon Nardi. Need comment from him. Quote
Sherzod Posted May 4, 2022 Posted May 4, 2022 2 minutes ago, artem_niko said: Ok...maybe this is bug in UniFSComponents Just try on UniButton first. Quote
artem_niko Posted May 4, 2022 Posted May 4, 2022 11 minutes ago, Sherzod said: Just try on UniButton first. In standart UniButton result: As is UniFSButton... Quote
Sherzod Posted May 4, 2022 Posted May 4, 2022 9 minutes ago, artem_niko said: In standart UniButton result: As is UniFSButton... So you have a conflict with some CSS rules that you use in your app. Quote
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.