x11 Posted December 21, 2020 Share Posted December 21, 2020 2 вопроса. 1. У TUniColorButton есть черный и белый цвета. Но как выбрать "пустой" цвет clNone? Например, пользователь хочет "очистить" цвет, т.е. чтобы в базу, в настройки записалось значение типа null/nil. Что нужно выбрать на палитре? Может быть можно в палитру как-то добавить свою пользовательскую кнопку типа "Очистить цвет"? Если да, то как? 2. Как выбирать пользовательский цвет? Например, как на картинке? P.S. Честно говоря, стандартная палитра очень и очень скудная. Спасибо. Quote Link to comment Share on other sites More sharing options...
x11 Posted December 22, 2020 Author Share Posted December 22, 2020 Может быть можно к TUniColorButton добавить триггер (дополнительную кнопку)? Quote Link to comment Share on other sites More sharing options...
x11 Posted December 22, 2020 Author Share Posted December 22, 2020 Т.к. триггеров нет, я решил добавить свою кнопку в контейнер (TuniToolbutton.Style := tbsContainer). Первые 2 картинки показывают, что в дизайне кнопка есть. А в браузере кнопка уже не отображается (картинка 3). Quote Link to comment Share on other sites More sharing options...
x11 Posted December 22, 2020 Author Share Posted December 22, 2020 DevTools показывает, что кнопка смещается вниз и она невидима (картинка 1). Хотя видно, что место в контейнере есть (картинка 2). Я так подразумеваю, что контейнер имеет вертикальный макет. Тогда как его сделать горизонтальным? Quote Link to comment Share on other sites More sharing options...
x11 Posted December 22, 2020 Author Share Posted December 22, 2020 Поспешил. Нашел свойство Layout Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 27, 2020 Share Posted December 27, 2020 On 12/21/2020 at 7:20 PM, x11 said: Скоро будет доступна 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted December 27, 2020 Author Share Posted December 27, 2020 не хватает кнопки "clear", как мне кажется Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 27, 2020 Share Posted December 27, 2020 3 minutes ago, x11 said: не хватает кнопки "clear", как мне кажется Какое значение должно быть в этом случае? Quote Link to comment Share on other sites More sharing options...
x11 Posted December 27, 2020 Author Share Posted December 27, 2020 константа clNone Quote Link to comment Share on other sites More sharing options...
x11 Posted December 27, 2020 Author Share Posted December 27, 2020 http://docwiki.embarcadero.com/RADStudio/Sydney/en/Colors_in_the_VCL clNone Represents no colors (black) $1FFFFFFF Quote Link to comment Share on other sites More sharing options...
x11 Posted December 27, 2020 Author Share Posted December 27, 2020 0 (ноль) нельзя, т.к. ноль - это clBlack Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 27, 2020 Share Posted December 27, 2020 Да, для TColor должно быть clNone, а для TAlphaColor - Null. 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted December 27, 2020 Author Share Posted December 27, 2020 да http://docwiki.embarcadero.com/Libraries/Sydney/en/System.UITypes.TAlphaColorRec или $00000000 Quote Link to comment Share on other sites More sharing options...
x11 Posted December 27, 2020 Author Share Posted December 27, 2020 еще есть claNull claNull: TAlphaColor = 0; http://docwiki.embarcadero.com/Libraries/Sydney/en/System.UIConsts Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 27, 2020 Share Posted December 27, 2020 procedure TMainForm.UniButton1Click(Sender: TObject); begin ShowMessage('UniPanel1.Color -> ' + ColorToString(UniPanel1.Color)) end; procedure TMainForm.UniColorBox1SelectEvent(Sender: TObject; NewAlphaColor, OldAlphaColor: TAlphaColor; NewColor: TColor); begin UniPanel1.Color := NewColor; UniColorBox2.SelectedColor := NewAlphaColor; end; 1 Quote Link to comment Share on other sites More sharing options...
picyka Posted December 29, 2020 Share Posted December 29, 2020 On 12/27/2020 at 1:11 PM, Sherzod said: Скоро будет доступна What is the name of this component in unigui? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 30, 2020 Share Posted December 30, 2020 3 hours ago, picyka said: What is the name of this component in unigui? Hello, This component will be included in the next builds. 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted December 30, 2020 Author Share Posted December 30, 2020 а по мобильномой компоненте для выбора цвета пока ничего не известно? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 30, 2020 Share Posted December 30, 2020 Just now, x11 said: а по мобильномой компоненте для выбора цвета пока ничего не известно? Здравствуйте, 5 hours ago, Sherzod said: This component will be included in the next builds. И для мобильной. 1 Quote Link to comment Share on other sites More sharing options...
x11 Posted March 27, 2021 Author Share Posted March 27, 2021 up Quote Link to comment Share on other sites More sharing options...
x11 Posted April 13, 2021 Author Share Posted April 13, 2021 up Quote Link to comment Share on other sites More sharing options...
x11 Posted July 1, 2021 Author Share Posted July 1, 2021 On 12/27/2020 at 6:11 PM, Sherzod said: Скоро будет доступна ?? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 15, 2021 Share Posted August 15, 2021 On 12/21/2020 at 7:20 PM, x11 said: On 12/27/2020 at 9:11 PM, Sherzod said: Скоро будет доступна 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 3, 2021 Share Posted October 3, 2021 On 7/1/2021 at 5:33 PM, x11 said: ?? Я подготовлю и чуть позже выложу пример (компонент). Quote Link to comment Share on other sites More sharing options...
Sherzod Posted October 3, 2021 Share Posted October 3, 2021 On 7/1/2021 at 5:33 PM, x11 said: ?? 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.