You've already forked lazarus-ccr
RxFPC:RxDBGrid - add tool menu command for optimize column width
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5187 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -55,13 +55,13 @@
|
|||||||
<MinVersion Major="1" Release="18" Build="56" Valid="True"/>
|
<MinVersion Major="1" Release="18" Build="56" Valid="True"/>
|
||||||
</Item5>
|
</Item5>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="4">
|
<Units Count="5">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="RxDBGridDemo.lpr"/>
|
<Filename Value="RxDBGridDemo.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<CursorPos X="47" Y="18"/>
|
<CursorPos X="47" Y="18"/>
|
||||||
<UsageCount Value="113"/>
|
<UsageCount Value="116"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="rxdbgridmainunit.pas"/>
|
<Filename Value="rxdbgridmainunit.pas"/>
|
||||||
@@ -72,30 +72,37 @@
|
|||||||
<UnitName Value="RxDBGridMainUnit"/>
|
<UnitName Value="RxDBGridMainUnit"/>
|
||||||
<TopLine Value="152"/>
|
<TopLine Value="152"/>
|
||||||
<CursorPos X="33" Y="171"/>
|
<CursorPos X="33" Y="171"/>
|
||||||
<UsageCount Value="113"/>
|
<UsageCount Value="116"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="../../rxdbgrid.pas"/>
|
<Filename Value="../../rxdbgrid.pas"/>
|
||||||
<EditorIndex Value="2"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<TopLine Value="4637"/>
|
<EditorIndex Value="1"/>
|
||||||
<CursorPos X="31" Y="4633"/>
|
<TopLine Value="2489"/>
|
||||||
<UsageCount Value="10"/>
|
<CursorPos X="72" Y="2503"/>
|
||||||
|
<UsageCount Value="11"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
<Filename Value="../../rxdbgridexportspreadsheet.pas"/>
|
||||||
<UnitName Value="RxDBGridExportSpreadSheet"/>
|
<UnitName Value="RxDBGridExportSpreadSheet"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<EditorIndex Value="-1"/>
|
||||||
<EditorIndex Value="1"/>
|
<TopLine Value="79"/>
|
||||||
<TopLine Value="411"/>
|
<CursorPos Y="80"/>
|
||||||
<CursorPos X="5" Y="413"/>
|
<UsageCount Value="10"/>
|
||||||
|
</Unit3>
|
||||||
|
<Unit4>
|
||||||
|
<Filename Value="../../rxdconst.pas"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<TopLine Value="100"/>
|
||||||
|
<CursorPos X="12" Y="121"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit3>
|
</Unit4>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="3" HistoryIndex="2">
|
<JumpHistory Count="10" HistoryIndex="7">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="rxdbgridmainunit.pas"/>
|
<Filename Value="rxdbgridmainunit.pas"/>
|
||||||
<Caret Line="14" Column="134"/>
|
<Caret Line="14" Column="134"/>
|
||||||
@@ -107,6 +114,34 @@
|
|||||||
<Filename Value="rxdbgridmainunit.pas"/>
|
<Filename Value="rxdbgridmainunit.pas"/>
|
||||||
<Caret Line="172" Column="21" TopLine="158"/>
|
<Caret Line="172" Column="21" TopLine="158"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
|
<Position4>
|
||||||
|
<Filename Value="../../rxdbgrid.pas"/>
|
||||||
|
<Caret Line="4649" Column="19" TopLine="4638"/>
|
||||||
|
</Position4>
|
||||||
|
<Position5>
|
||||||
|
<Filename Value="../../rxdbgrid.pas"/>
|
||||||
|
<Caret Line="114" Column="19" TopLine="82"/>
|
||||||
|
</Position5>
|
||||||
|
<Position6>
|
||||||
|
<Filename Value="../../rxdbgrid.pas"/>
|
||||||
|
<Caret Line="163" TopLine="131"/>
|
||||||
|
</Position6>
|
||||||
|
<Position7>
|
||||||
|
<Filename Value="../../rxdbgrid.pas"/>
|
||||||
|
<Caret Line="609" Column="21" TopLine="587"/>
|
||||||
|
</Position7>
|
||||||
|
<Position8>
|
||||||
|
<Filename Value="../../rxdbgrid.pas"/>
|
||||||
|
<Caret Line="2502" Column="51" TopLine="2491"/>
|
||||||
|
</Position8>
|
||||||
|
<Position9>
|
||||||
|
<Filename Value="../../rxdbgrid.pas"/>
|
||||||
|
<Caret Line="741" Column="33" TopLine="722"/>
|
||||||
|
</Position9>
|
||||||
|
<Position10>
|
||||||
|
<Filename Value="../../rxdbgrid.pas"/>
|
||||||
|
<Caret Line="5423" Column="27" TopLine="5421"/>
|
||||||
|
</Position10>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
|
@@ -470,6 +470,10 @@ msgstr "Hacia Delante"
|
|||||||
msgid "Text to find"
|
msgid "Text to find"
|
||||||
msgstr "Texto a Buscar"
|
msgstr "Texto a Buscar"
|
||||||
|
|
||||||
|
#: rxdconst.srxdbgridoptimizecolwidth
|
||||||
|
msgid "Optimize column width"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxdbgridselapplycaption
|
#: rxdconst.srxdbgridselapplycaption
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgctxt "rxdconst.srxdbgridselapplycaption"
|
msgctxt "rxdconst.srxdbgridselapplycaption"
|
||||||
|
@@ -456,6 +456,10 @@ msgstr ""
|
|||||||
msgid "Text to find"
|
msgid "Text to find"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: rxdconst.srxdbgridoptimizecolwidth
|
||||||
|
msgid "Optimize column width"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxdbgridselapplycaption
|
#: rxdconst.srxdbgridselapplycaption
|
||||||
msgctxt "rxdconst.srxdbgridselapplycaption"
|
msgctxt "rxdconst.srxdbgridselapplycaption"
|
||||||
msgid "Apply"
|
msgid "Apply"
|
||||||
|
@@ -466,6 +466,10 @@ msgstr "Вперёд"
|
|||||||
msgid "Text to find"
|
msgid "Text to find"
|
||||||
msgstr "Текст для поиска"
|
msgstr "Текст для поиска"
|
||||||
|
|
||||||
|
#: rxdconst.srxdbgridoptimizecolwidth
|
||||||
|
msgid "Optimize column width"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxdbgridselapplycaption
|
#: rxdconst.srxdbgridselapplycaption
|
||||||
msgctxt "rxdconst.srxdbgridselapplycaption"
|
msgctxt "rxdconst.srxdbgridselapplycaption"
|
||||||
msgid "Apply"
|
msgid "Apply"
|
||||||
|
@@ -468,6 +468,10 @@ msgstr "Вперед"
|
|||||||
msgid "Text to find"
|
msgid "Text to find"
|
||||||
msgstr "Текст для пошуку"
|
msgstr "Текст для пошуку"
|
||||||
|
|
||||||
|
#: rxdconst.srxdbgridoptimizecolwidth
|
||||||
|
msgid "Optimize column width"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxdbgridselapplycaption
|
#: rxdconst.srxdbgridselapplycaption
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgctxt "rxdconst.srxdbgridselapplycaption"
|
msgctxt "rxdconst.srxdbgridselapplycaption"
|
||||||
|
@@ -738,6 +738,7 @@ type
|
|||||||
procedure OnChooseVisibleFields(Sender: TObject);
|
procedure OnChooseVisibleFields(Sender: TObject);
|
||||||
procedure OnSelectAllRows(Sender: TObject);
|
procedure OnSelectAllRows(Sender: TObject);
|
||||||
procedure OnCopyCellValue(Sender: TObject);
|
procedure OnCopyCellValue(Sender: TObject);
|
||||||
|
procedure OnOptimizeColWidth(Sender: TObject);
|
||||||
procedure Loaded; override;
|
procedure Loaded; override;
|
||||||
procedure UpdateFooterRowOnUpdateActive;
|
procedure UpdateFooterRowOnUpdateActive;
|
||||||
|
|
||||||
@@ -2499,6 +2500,7 @@ begin
|
|||||||
CreateToolMenuItem('W', sRxDBGridSelectColumns, @OnChooseVisibleFields);
|
CreateToolMenuItem('W', sRxDBGridSelectColumns, @OnChooseVisibleFields);
|
||||||
CreateToolMenuItem('A', sRxDBGridSelectAllRows, @OnSelectAllRows);
|
CreateToolMenuItem('A', sRxDBGridSelectAllRows, @OnSelectAllRows);
|
||||||
CreateToolMenuItem(#0, sRxDBGridCopyCellValue, @OnCopyCellValue);
|
CreateToolMenuItem(#0, sRxDBGridCopyCellValue, @OnCopyCellValue);
|
||||||
|
CreateToolMenuItem(#0, sRxDBGridOptimizeColWidth, @OnOptimizeColWidth);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TRxDBGrid.GetPropertyStorage: TCustomPropertyStorage;
|
function TRxDBGrid.GetPropertyStorage: TCustomPropertyStorage;
|
||||||
@@ -5416,6 +5418,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TRxDBGrid.OnOptimizeColWidth(Sender: TObject);
|
||||||
|
begin
|
||||||
|
OptimizeColumnsWidthAll;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TRxDBGrid.Loaded;
|
procedure TRxDBGrid.Loaded;
|
||||||
begin
|
begin
|
||||||
inherited Loaded;
|
inherited Loaded;
|
||||||
|
@@ -108,16 +108,17 @@ resourcestring
|
|||||||
SFieldReadOnly = 'SFieldReadOnly %s';
|
SFieldReadOnly = 'SFieldReadOnly %s';
|
||||||
|
|
||||||
//RXDBgrid
|
//RXDBgrid
|
||||||
sRxDBGridFind = 'Find data'; //// 'Buscar Ctrl+F';
|
sRxDBGridFind = 'Find data';
|
||||||
sRxDBGridFilter = 'Filter data';//'Filtrar Ctrl+T';
|
sRxDBGridFilter = 'Filter data';
|
||||||
sRxDBGridFilterSimple = 'Filter in table';// Ctrl+E'; 'Filtrar en Encabezado Ctrl+E';
|
sRxDBGridFilterSimple = 'Filter in table';
|
||||||
sRxDBGridFilterClear = 'Clear filter';// Ctrl+Q';'Quitar Filtro Ctrl+Q';
|
sRxDBGridFilterClear = 'Clear filter';
|
||||||
sRxDBGridSortByColumns = 'Sort data for columns';// Ctrl+C';'Ordenar por Columnas Ctrl+C';
|
sRxDBGridSortByColumns = 'Sort data for columns';
|
||||||
sRxDBGridSelectColumns = 'Select visible columns';// Ctrl+W';'Seleccionar Columnas Ctrl+W';
|
sRxDBGridSelectColumns = 'Select visible columns';
|
||||||
sRxDBGridEmptiFilter = '(Empty)';
|
sRxDBGridEmptiFilter = '(Empty)';
|
||||||
sRxDBGridAllFilter = '(All values)';
|
sRxDBGridAllFilter = '(All values)';
|
||||||
sRxDBGridSelectAllRows = 'Select all rows';// Ctrl+W';'Seleccionar Columnas Ctrl+W';
|
sRxDBGridSelectAllRows = 'Select all rows';
|
||||||
sRxDBGridCopyCellValue = 'Copy cell value';// Ctrl+W';'Seleccionar Columnas Ctrl+W';
|
sRxDBGridCopyCellValue = 'Copy cell value';
|
||||||
|
sRxDBGridOptimizeColWidth = 'Optimize column width';
|
||||||
|
|
||||||
//RxDBGrid filter form
|
//RxDBGrid filter form
|
||||||
sRxFilterFormSelectExp = 'Enter filter expression for data in table:';
|
sRxFilterFormSelectExp = 'Enter filter expression for data in table:';
|
||||||
|
Reference in New Issue
Block a user