mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-22 10:52:31 +02:00
LCL: Implement ValidParentForm function (Delphi compatibility)
git-svn-id: trunk@46048 -
This commit is contained in:
parent
f3e358caff
commit
dc8bcb7190
10
lcl/forms.pp
10
lcl/forms.pp
@ -1726,6 +1726,7 @@ var
|
||||
|
||||
function GetParentForm(Control: TControl; TopForm: Boolean = True): TCustomForm;
|
||||
function GetFirstParentForm(Control:TControl): TCustomForm;
|
||||
function ValidParentForm(Control: TControl; TopForm: Boolean = True): TCustomForm;
|
||||
function GetDesignerForm(APersistent: TPersistent): TCustomForm;
|
||||
function FindRootDesigner(APersistent: TPersistent): TIDesigner;
|
||||
|
||||
@ -1915,6 +1916,15 @@ begin
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function ValidParentForm(Control: TControl; TopForm: Boolean): TCustomForm;
|
||||
begin
|
||||
Result := GetParentForm(Control, TopForm);
|
||||
if Result = nil then
|
||||
raise EInvalidOperation.CreateFmt(sParentRequired, [Control.Name]);
|
||||
end;
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
function IsAccel(VK: word; const Str: string): Boolean;
|
||||
const
|
||||
|
@ -1488,6 +1488,10 @@ msgstr "No hi ha cap forma MDI present"
|
||||
msgid "No timers available"
|
||||
msgstr "No hi ha rellotges disponibles"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr ""
|
||||
|
@ -1473,6 +1473,10 @@ msgstr "Nepřítomno žádné MDI okno."
|
||||
msgid "No timers available"
|
||||
msgstr "Nedostupné žádné časovače"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "Nesprávný typ symbolu: očekáváno %s"
|
||||
|
@ -1480,6 +1480,10 @@ msgstr "Kein MDI-Formular vorhanden"
|
||||
msgid "No timers available"
|
||||
msgstr "Keine Timer verfügbar"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "Falscher Token-Typ: %s erwartet"
|
||||
|
@ -1490,6 +1490,10 @@ msgstr "No hay un formulario MDI presente"
|
||||
msgid "No timers available"
|
||||
msgstr "No hay temporizadores disponibles"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "Tipo de token incorrecto: Se esperaba %s "
|
||||
|
@ -1447,6 +1447,10 @@ msgstr ""
|
||||
msgid "No timers available"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr ""
|
||||
|
@ -1470,6 +1470,10 @@ msgstr "Aucune fiche MDI présente"
|
||||
msgid "No timers available"
|
||||
msgstr "Aucun temporisateur disponible"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "Mauvais type d'identifieur: %s attendu"
|
||||
|
@ -1483,6 +1483,10 @@ msgstr "לא קיים טופס MDI "
|
||||
msgid "No timers available"
|
||||
msgstr "אין קוצב זמן זמין"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "סוג token שגוי: %s צפוי"
|
||||
|
@ -1468,6 +1468,10 @@ msgstr "Nincs MDI form."
|
||||
msgid "No timers available"
|
||||
msgstr "Nincsenek elérhető időzítők"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "Rossz vezérjel típus: %s az elvárt"
|
||||
|
@ -1489,6 +1489,10 @@ msgstr "Tidak ada form MDI"
|
||||
msgid "No timers available"
|
||||
msgstr "Tidak tersedia timer"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr ""
|
||||
|
@ -1470,6 +1470,10 @@ msgstr "Nessun form MDI presente."
|
||||
msgid "No timers available"
|
||||
msgstr "Nessun timer disponibile"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "Tipo token errato: era atteso %s"
|
||||
|
@ -1478,6 +1478,10 @@ msgstr "MDI フォームが存在しません。"
|
||||
msgid "No timers available"
|
||||
msgstr "利用できるタイマーがありません"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "正しくないトークンタイプ:%sではありません"
|
||||
|
@ -1488,6 +1488,10 @@ msgstr "MDI formos nėra."
|
||||
msgid "No timers available"
|
||||
msgstr "Nėra laikmačių"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "Klaidingas leksemos tipas: tikėtasi %s"
|
||||
|
@ -1489,6 +1489,10 @@ msgstr "Geen MDI formulier aanwezig"
|
||||
msgid "No timers available"
|
||||
msgstr "Geen timers beschikbaar"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "Verkeerd tokentype: %s verwacht"
|
||||
|
@ -1494,6 +1494,10 @@ msgstr "Ingen MDI-formular til rådighet."
|
||||
msgid "No timers available"
|
||||
msgstr "Ingen timere tilgjengelig"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr ""
|
||||
|
@ -1460,6 +1460,10 @@ msgstr ""
|
||||
msgid "No timers available"
|
||||
msgstr "Brak dostępnych timerów"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr ""
|
||||
|
@ -1441,6 +1441,10 @@ msgstr ""
|
||||
msgid "No timers available"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr ""
|
||||
|
@ -1485,6 +1485,10 @@ msgstr "Nenhum formulário MDI presente."
|
||||
msgid "No timers available"
|
||||
msgstr "Nenhum temporizador disponível"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "Tipo sílaba incorreta: %s esperado"
|
||||
|
@ -1480,6 +1480,10 @@ msgstr "Отсутствует форма MDI."
|
||||
msgid "No timers available"
|
||||
msgstr "Таймеры недоступны"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "Неверный тип лексемы: ожидался %s"
|
||||
|
@ -1489,6 +1489,10 @@ msgstr "Nie je MIDI formulár"
|
||||
msgid "No timers available"
|
||||
msgstr "Nie sú dostupné žiadne časovače"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "Zlý typ tokenu: očakávaný %s"
|
||||
|
@ -1488,6 +1488,10 @@ msgstr "MDI Pencere mevcut değil."
|
||||
msgid "No timers available"
|
||||
msgstr "Kullanılabilir zamanlayıcı yok"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr ""
|
||||
|
@ -1483,6 +1483,10 @@ msgstr "Немає MDI форми."
|
||||
msgid "No timers available"
|
||||
msgstr "Немає доступних таймерів"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "Невірний тип маркера: очікується %s"
|
||||
|
@ -1491,6 +1491,10 @@ msgstr "没有 MDI 窗体出现"
|
||||
msgid "No timers available"
|
||||
msgstr "无有效计时器"
|
||||
|
||||
#: lclstrconsts.sparentrequired
|
||||
msgid "Control \"%s\" has no parent window"
|
||||
msgstr ""
|
||||
|
||||
#: lclstrconsts.sparexpected
|
||||
msgid "Wrong token type: %s expected"
|
||||
msgstr "错误的标识符类型:期望 %s"
|
||||
|
@ -217,6 +217,7 @@ resourceString
|
||||
sInvalidImageSize = 'Invalid image size';
|
||||
sDuplicateMenus = 'Duplicate menus';
|
||||
sCannotFocus = 'Cannot focus a disabled or invisible window';
|
||||
sParentRequired = 'Control "%s" has no parent window';
|
||||
sInvalidCharSet = 'The char set in mask "%s" is not valid!';
|
||||
SMaskEditNoMatch = 'The current text does not match the specified mask.';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user