dbf_usr Posted June 26, 2019 Share Posted June 26, 2019 Как в DBGrid в одной ячейке разместить текст в две строки разным с разным размером шрифта и и с разным цветом шрифта? Пример: Очень нужно - жду ответа! Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 26, 2019 Share Posted June 26, 2019 Попробуйте использовать в ячейке (в поле) HTML форматированный текст. Quote Link to comment Share on other sites More sharing options...
dbf_usr Posted June 26, 2019 Author Share Posted June 26, 2019 2 minutes ago, Sherzod said: Попробуйте использовать в ячейке (в поле) HTML форматированный текст. Подскажите пожалуйста, где об этом можно почитать - как правильно использовать. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 26, 2019 Share Posted June 26, 2019 5 minutes ago, dbf_usr said: Подскажите пожалуйста, где об этом можно почитать - как правильно использовать. Ну к примеру Вы можете посмотреть этот демо: \FMSoft\Framework\uniGUI\Demos\Desktop\DBDemo Quote Link to comment Share on other sites More sharing options...
dbf_usr Posted June 26, 2019 Author Share Posted June 26, 2019 Спасибо коллеги!!! Quote Link to comment Share on other sites More sharing options...
dbf_usr Posted June 26, 2019 Author Share Posted June 26, 2019 А подскажите еще пожалуйста как убрать выделение ячейки, что бы курсором Выделялась вся строка, а не ячейка и текст выравнивался посредине во всех остальных ячейках, а не по верхнему краю. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 26, 2019 Share Posted June 26, 2019 24 minutes ago, dbf_usr said: как убрать выделение ячейки, что бы курсором Выделялась вся строка UniDBGrid -> Options -> dgRowSelect = True Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 26, 2019 Share Posted June 26, 2019 27 minutes ago, dbf_usr said: и текст выравнивался посредине во всех остальных ячейках, а не по верхнему краю. 1. UniServerModule -> CustomCSS: .customgrid .x-grid-td { vertical-align: middle; } 2. UniDBGrid -> LayoutConfig ->Cls = customgrid Quote Link to comment Share on other sites More sharing options...
dbf_usr Posted June 27, 2019 Author Share Posted June 27, 2019 23 hours ago, CoderU said: procedure TMainForm.qrySaleListRECEIPNMGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin Text := '<span style="line-height: 0.5; text-align: left"><sup>' + Sender.AsString + '</sup></span><br><span style="line-height: 2.0;color : #4183C4;text-align: left">' + Sender.AsString + '</span>'; end; Подскажите, а что это за процедура? Можно как-то подменять содержимое всего столбца в DBGrid? Потому, что я собирался подменять в самом SQL запросе, а это очень неудобно... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 27, 2019 Share Posted June 27, 2019 37 minutes ago, dbf_usr said: Подскажите, а что это за процедура? http://docwiki.embarcadero.com/Libraries/Rio/en/Data.DB.TField.OnGetText Quote Link to comment Share on other sites More sharing options...
Tokay Posted June 27, 2019 Share Posted June 27, 2019 11 hours ago, dbf_usr said: Подскажите, а что это за процедура? Можно как-то подменять содержимое всего столбца в DBGrid? Потому, что я собирался подменять в самом SQL запросе, а это очень неудобно... Гугли TStringField, TIntegerField Quote Link to comment Share on other sites More sharing options...
dbf_usr Posted July 1, 2019 Author Share Posted July 1, 2019 Спасибо! Все увидел )) 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.