Add "Copy list columns header" context command SQL Result

Добавлено копирование в буфер обмена списка имен и типов колонок результата запроса.
This commit is contained in:
lsv 2022-07-13 16:34:27 +05:00
parent 8c123b0550
commit 0ec8c60a68
6 changed files with 51 additions and 3 deletions

View file

@ -332,6 +332,36 @@ wxString ctlSQLResult::OnGetItemText(long item, long col) const
}
return wxEmptyString;
}
wxString ctlSQLResult::CopySelColumnNameType()
{
size_t i;
wxString ss = wxEmptyString;
if (GetSelectedCols().GetCount()) {
wxArrayInt cols = GetSelectedCols();
int err = 0;
int noformat = 0;
int dtType = -1;
//AppendColumnHeader(str, cols);
//str.Append(GetExportLine(i, cols));
for (size_t col = 0; col < cols.Count(); col++)
{
int cl = cols[col];
bool isDt = false;
wxString colName = colNames.Item(cl);
wxString colType = colTypes.Item(cl);
if (!ss.IsEmpty()) ss.Append(", ");
ss.Append(colName + " " + colType);
}
}
if (wxTheClipboard->Open())
{
wxTheClipboard->SetData(new wxTextDataObject(ss));
wxTheClipboard->Close();
}
return ss;
}
wxString ctlSQLResult::CheckSelColumnDate()
{
size_t i;