mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-04 09:38:17 +02:00
TAChart: Add commands "Move up" and "Move down" to DataPoints editor's popup menu.
git-svn-id: trunk@60498 -
This commit is contained in:
parent
ccdd55bc35
commit
e5871a60af
@ -29,6 +29,14 @@ msgstr "Zeile löschen"
|
||||
msgid "Insert row"
|
||||
msgstr "Zeile einfügen"
|
||||
|
||||
#: tachartstrconsts.desmovedown
|
||||
msgid "Move down"
|
||||
msgstr "Nach oben"
|
||||
|
||||
#: tachartstrconsts.desmoveup
|
||||
msgid "Move up"
|
||||
msgstr "Nach unten"
|
||||
|
||||
#: tachartstrconsts.desnointeger
|
||||
msgid "Value must be an integer."
|
||||
msgstr "Wert muss eine ganze Zahl sein."
|
||||
|
@ -17,6 +17,14 @@ msgstr "Poista rivi"
|
||||
msgid "Insert row"
|
||||
msgstr "Lisää rivi"
|
||||
|
||||
#: tachartstrconsts.desmovedown
|
||||
msgid "Move down"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desmoveup
|
||||
msgid "Move up"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desnointeger
|
||||
msgid "Value must be an integer."
|
||||
msgstr ""
|
||||
|
@ -27,6 +27,14 @@ msgstr "Supprimer la ligne"
|
||||
msgid "Insert row"
|
||||
msgstr "Insérer une ligne"
|
||||
|
||||
#: tachartstrconsts.desmovedown
|
||||
msgid "Move down"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desmoveup
|
||||
msgid "Move up"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desnointeger
|
||||
msgid "Value must be an integer."
|
||||
msgstr ""
|
||||
|
@ -27,6 +27,14 @@ msgstr "Sor törlése"
|
||||
msgid "Insert row"
|
||||
msgstr "Sor beszúrása"
|
||||
|
||||
#: tachartstrconsts.desmovedown
|
||||
msgid "Move down"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desmoveup
|
||||
msgid "Move up"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desnointeger
|
||||
msgid "Value must be an integer."
|
||||
msgstr ""
|
||||
|
@ -28,6 +28,14 @@ msgstr "Šalinti eilutę"
|
||||
msgid "Insert row"
|
||||
msgstr "Įterpti eilutę"
|
||||
|
||||
#: tachartstrconsts.desmovedown
|
||||
msgid "Move down"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desmoveup
|
||||
msgid "Move up"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desnointeger
|
||||
msgid "Value must be an integer."
|
||||
msgstr ""
|
||||
|
@ -28,6 +28,14 @@ msgstr "Usuń wiersz"
|
||||
msgid "Insert row"
|
||||
msgstr "Wstaw wiersz"
|
||||
|
||||
#: tachartstrconsts.desmovedown
|
||||
msgid "Move down"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desmoveup
|
||||
msgid "Move up"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desnointeger
|
||||
msgid "Value must be an integer."
|
||||
msgstr ""
|
||||
|
@ -17,6 +17,14 @@ msgstr ""
|
||||
msgid "Insert row"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desmovedown
|
||||
msgid "Move down"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desmoveup
|
||||
msgid "Move up"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desnointeger
|
||||
msgid "Value must be an integer."
|
||||
msgstr ""
|
||||
|
@ -27,6 +27,14 @@ msgstr "Excluir linha"
|
||||
msgid "Insert row"
|
||||
msgstr "Inserir linha"
|
||||
|
||||
#: tachartstrconsts.desmovedown
|
||||
msgid "Move down"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desmoveup
|
||||
msgid "Move up"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desnointeger
|
||||
msgid "Value must be an integer."
|
||||
msgstr ""
|
||||
|
@ -27,6 +27,14 @@ msgstr "Удалить строку"
|
||||
msgid "Insert row"
|
||||
msgstr "Вставить строку"
|
||||
|
||||
#: tachartstrconsts.desmovedown
|
||||
msgid "Move down"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desmoveup
|
||||
msgid "Move up"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desnointeger
|
||||
msgid "Value must be an integer."
|
||||
msgstr ""
|
||||
|
@ -28,6 +28,14 @@ msgstr ""
|
||||
msgid "Insert row"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desmovedown
|
||||
msgid "Move down"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desmoveup
|
||||
msgid "Move up"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desnointeger
|
||||
msgid "Value must be an integer."
|
||||
msgstr ""
|
||||
|
@ -30,6 +30,14 @@ msgstr "Видалити рядок"
|
||||
msgid "Insert row"
|
||||
msgstr "Вставити рядок"
|
||||
|
||||
#: tachartstrconsts.desmovedown
|
||||
msgid "Move down"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desmoveup
|
||||
msgid "Move up"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desnointeger
|
||||
msgid "Value must be an integer."
|
||||
msgstr ""
|
||||
|
@ -28,6 +28,14 @@ msgstr "删除行"
|
||||
msgid "Insert row"
|
||||
msgstr "插入行"
|
||||
|
||||
#: tachartstrconsts.desmovedown
|
||||
msgid "Move down"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desmoveup
|
||||
msgid "Move up"
|
||||
msgstr ""
|
||||
|
||||
#: tachartstrconsts.desnointeger
|
||||
msgid "Value must be an integer."
|
||||
msgstr ""
|
||||
|
@ -36,6 +36,8 @@ resourcestring
|
||||
desText = 'Text';
|
||||
desInsertRow = 'Insert row';
|
||||
desDeleteRow = 'Delete row';
|
||||
desMoveUp = 'Move up';
|
||||
desMoveDown = 'Move down';
|
||||
desNoNumber = 'Non-numeric value.';
|
||||
desNoInteger = 'Value must be an integer.';
|
||||
|
||||
|
@ -81,6 +81,17 @@ object DataPointsEditorForm: TDataPointsEditorForm
|
||||
Caption = 'Delete row'
|
||||
OnClick = miDeleteRowClick
|
||||
end
|
||||
object miSeparator: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object miMoveUp: TMenuItem
|
||||
Caption = 'Move up'
|
||||
OnClick = miMoveUpClick
|
||||
end
|
||||
object miMoveDown: TMenuItem
|
||||
Caption = 'Move down'
|
||||
OnClick = miMoveDownClick
|
||||
end
|
||||
end
|
||||
object cdItemColor: TColorDialog
|
||||
Color = clBlack
|
||||
|
@ -24,6 +24,9 @@ type
|
||||
TDataPointsEditorForm = class(TForm)
|
||||
ButtonPanel1: TButtonPanel;
|
||||
cdItemColor: TColorDialog;
|
||||
miMoveDown: TMenuItem;
|
||||
miMoveUp: TMenuItem;
|
||||
miSeparator: TMenuItem;
|
||||
miInsertRow: TMenuItem;
|
||||
miDeleteRow: TMenuItem;
|
||||
pmRows: TPopupMenu;
|
||||
@ -31,6 +34,8 @@ type
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure miDeleteRowClick(Sender: TObject);
|
||||
procedure miInsertRowClick(Sender: TObject);
|
||||
procedure miMoveDownClick(Sender: TObject);
|
||||
procedure miMoveUpClick(Sender: TObject);
|
||||
procedure OKButtonClick(Sender: TObject);
|
||||
procedure pmRowsPopup(Sender: TObject);
|
||||
procedure sgDataButtonClick(ASender: TObject; ACol, ARow: Integer);
|
||||
@ -44,6 +49,7 @@ type
|
||||
FDataPoints: TStrings;
|
||||
FXCount: Integer;
|
||||
FYCount: Integer;
|
||||
procedure UpdateCmds;
|
||||
function ValidData(out ACol, ARow: Integer; out AMsg: String): Boolean;
|
||||
public
|
||||
procedure InitData(AXCount, AYCount: Integer; ADataPoints: TStrings);
|
||||
@ -148,6 +154,8 @@ begin
|
||||
sgData.Columns[2].Title.Caption := desText;
|
||||
miInsertRow.Caption := desInsertRow;
|
||||
miDeleteRow.Caption := desDeleteRow;
|
||||
miMoveUp.Caption := desMoveUp;
|
||||
miMoveDown.Caption := desMoveDown;
|
||||
end;
|
||||
|
||||
procedure TDataPointsEditorForm.miInsertRowClick(Sender: TObject);
|
||||
@ -155,6 +163,18 @@ begin
|
||||
sgData.InsertColRow(false, FCurrentRow);
|
||||
end;
|
||||
|
||||
procedure TDataPointsEditorForm.miMoveDownClick(Sender: TObject);
|
||||
begin
|
||||
if sgData.Row < sgData.RowCount-1 then
|
||||
sgData.ExchangeColRow(false, sgData.Row, sgData.Row+1);
|
||||
end;
|
||||
|
||||
procedure TDataPointsEditorForm.miMoveUpClick(Sender: TObject);
|
||||
begin
|
||||
if sgData.Row > 1 then
|
||||
sgData.ExchangeColRow(false, sgData.Row, sgData.Row-1);
|
||||
end;
|
||||
|
||||
procedure TDataPointsEditorForm.OKButtonClick(Sender: TObject);
|
||||
var
|
||||
c, r: Integer;
|
||||
@ -175,6 +195,7 @@ begin
|
||||
if not InRange(FCurrentRow, 1, sgData.RowCount - 1) then
|
||||
Abort;
|
||||
sgData.Row := FCurrentRow;
|
||||
UpdateCmds;
|
||||
end;
|
||||
|
||||
procedure TDataPointsEditorForm.sgDataButtonClick(
|
||||
@ -215,6 +236,13 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TDataPointsEditorForm.UpdateCmds;
|
||||
begin
|
||||
miDeleteRow.Enabled := sgData.Row > 0;
|
||||
miMoveUp.Enabled := sgData.Row > 1;
|
||||
miMovedown.Enabled := sgData.Row < sgData.RowCount-1;
|
||||
end;
|
||||
|
||||
function TDataPointsEditorForm.ValidData(out ACol, ARow: Integer;
|
||||
out AMsg: String): Boolean;
|
||||
var
|
||||
|
@ -307,7 +307,7 @@ type
|
||||
{$ENDIF}
|
||||
procedure Notification(
|
||||
AComponent: TComponent; AOperation: TOperation); override;
|
||||
procedure PrepareAxis(ADrawer: IChartDrawer);
|
||||
procedure PrepareAxis(ADrawer: IChartDrawer);
|
||||
function PrepareLegend(
|
||||
ADrawer: IChartDrawer; var AClipRect: TRect): TChartLegendDrawingData;
|
||||
procedure SetBiDiMode(AValue: TBiDiMode); override;
|
||||
|
Loading…
Reference in New Issue
Block a user