• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

A Powerful Grid System for RAD: Steema TeeGrid (VCL & FMX)

Sascha Оффлайн

Sascha

Заместитель Администратора
Команда форума
Администратор
Регистрация
9 Май 2015
Сообщения
1,600
Баллы
155
Intro


Grid systems represents an important part of the UI design for database applications – a key application type for RAD Studio users. Aware of that Embarcadero is providing a full version of the powerful

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

for both VCL and FMX as part of the current

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

(the promo also brings Interbase ToGo and DerScanner, depending on the RAD Studio, Delphi or C++ Builder edition you select)!

If you want to give it a try, there is a trial version available directly from

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

. The installer is also packed with a good amount of samples and documentation, which are also accessible from their

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

.

Getting started with teeGrid for VCL and FMX


Despite the good set of samples that are available provided by Steema, I decided to build something from scratch to better explorer some specific features that caught my attention when visiting the product documentation.

screenshot 2025 07 21 190000


You can check out and download the entire demo from my

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

, but I’d like to emphasize some of the interesting features I selected for this sample. Notice this is a VCL based application, but the same features are also available for FMX.

  • Applying a theme: if your app is using a theme, you can apply the current theme to the Grid with just one line of code:
TVCLGridThemes.ApplyTo(TeeGrid1);
TVCLGridThemes.ApplyTo(TeeGrid1);
  • Formatting one or more columns: you can apply specific formats to one or more columns, for example:
TeeGrid1.Columns[0].ParentFormat := False; TeeGrid1.Columns[0].Format.Font.Color := clRed;
TeeGrid1.Columns[0].ParentFormat := False;
TeeGrid1.Columns[0].Format.Font.Color := clRed;
  • Formatting one or more cells: you can apply specific formats to one cell based on the values and etc:
TeeGrid1.Columns['SALARY'].OnPaint := myPaint; ... procedure TMainForm.myPaint(const Sender: TColumn; var AData: TRenderData; var DefaultPaint: Boolean); begin DefaultPaint := True; if AData.Data.ToDouble <= 27000 then begin AData.Painter.SetFontColor(clRed); AData.Painter.Fill(AData.Bounds, clYellow); end else AData.Painter.SetFontColor(clBlack); end;
TeeGrid1.Columns['SALARY'].OnPaint := myPaint;
procedure TMainForm.myPaint(const Sender: TColumn; var AData: TRenderData;
var DefaultPaint: Boolean);
DefaultPaint := True;
if AData.Data.ToDouble <= 27000 then
AData.Painter.SetFontColor(clRed);
AData.Painter.Fill(AData.Bounds, clYellow);
AData.Painter.SetFontColor(clBlack);
  • Locking one or more columns: you can lock columns in order to provider a better data navigation
TeeGrid1.Columns['EMP_NO'].Locked := TColumnLocked.Left; TeeGrid1.Columns['EMP_NO'].ParentFormat := False; TeeGrid1.Columns['EMP_NO'].Format.Brush.Show; TeeGrid1.Columns['EMP_NO'].Format.Brush.Color := TColors.Navajowhite;
TeeGrid1.Columns['EMP_NO'].Locked := TColumnLocked.Left;
TeeGrid1.Columns['EMP_NO'].ParentFormat := False;
TeeGrid1.Columns['EMP_NO'].Format.Brush.Show;
TeeGrid1.Columns['EMP_NO'].Format.Brush.Color := TColors.Navajowhite;
  • Row Heights can be adjusted as well via code
TeeGrid1.Rows.Height.Automatic := False; TeeGrid1.Rows.Height.Value := 50;
TeeGrid1.Rows.Height.Automatic := False;
TeeGrid1.Rows.Height.Value := 50;
  • Range Selections allow the user to select and copy data directly from the grid
TeeGrid1.Selected.Range.Enabled := True; ... Clipboard.AsText := TCSVData.From(TeeGrid1.Grid, TeeGrid1.Selected);
TeeGrid1.Selected.Range.Enabled := True;
Clipboard.AsText := TCSVData.From(TeeGrid1.Grid, TeeGrid1.Selected);
  • Row Totals can be added on the fly, for example
var Totals: TColumnTotals; begin Totals := TColumnTotals.Create(TeeGrid1.Footer); Totals.Calculation.Add('Salary', TColumnCalculation.Sum); Totals.Format.Brush.Gradient.Visible := False; Totals.Format.Brush.Gradient.Visible := False; Totals.Format.Brush.Color := clYellow; Totals.Format.Brush.Visible := True; Totals.Format.Font.Size := 9; Totals.Format.Font.Style := [fsBold]; end;
Totals: TColumnTotals;
Totals := TColumnTotals.Create(TeeGrid1.Footer);
Totals.Calculation.Add('Salary', TColumnCalculation.Sum);
Totals.Format.Brush.Gradient.Visible := False;
Totals.Format.Brush.Gradient.Visible := False;
Totals.Format.Brush.Color := clYellow;
Totals.Format.Brush.Visible := True;
Totals.Format.Font.Size := 9;
Totals.Format.Font.Style := [fsBold];
Conclusion


The Steema teeGrid System can be very useful while you are modernizing an existing solution or creating a new one, supporting not only VCL but also FMX on different platforms, like this sample running on Linux:

ubuntulazarus-9091538


To know more about the current promo and all the details, please, visit the

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

, or contact your sales representant!



Источник:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу