-
Posts
635 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Events
Everything posted by artem_niko
-
Hello! How add text here? This is top left corner in UniDBGrid. I need show some text in this place.
-
Yes, I added this line. The button appears where I wanted it to. But when I click it, the drop-down menu is not filled with a list of open tabs. There are no errors, but the list is not filled in either. Why?
-
Good afternoon! Is it possible to place an image on UniPageControl? I would like to display a picture if the UniPageControl does not contain, at the moment, tabs. But if it contains at least one tab, then do not show the picture.
-
Error: Cannot read properties of null (reading 'isComponent')
artem_niko replied to artem_niko's topic in General
I mean, which are on the deleted frame and tab? -
Hello! What could be the reason for such an error? I ask you to indicate the directions in which I need to look to find the reason. For example, an error occurs when a UniTabSheet is created dynamically by clicking on the button, and a UniFrame is on it, then I destroy them, click on the create them button again and get this error.
-
Блин, гениально и просто... Спасибо!
-
Ааа, понял, конфликт Sender'ов... Но, а как без него использовать MessageDlg?
-
Я заменил на это, но ничего не помогло: MessageDlg('Close?<br>',mtConfirmation, mbYesNo, procedure(Sender: TComponent; ARes: Integer) var i: Integer; begin case ARes of mrYes: begin UniMainModule.AllowClose:=True; i:=0; for i := 0 to (Sender as TUniTabSheet).ComponentCount - 1 do begin if (Sender as TUniTabSheet).Components[i] is TFDConnection then ((Sender as TUniTabSheet).Components[i] as TFDConnection).Connected:=False; if (Sender as TUniTabSheet).Components[i] is TFDQuery then ((Sender as TUniTabSheet).Components[i] as TFDQuery).Close; end; end; end; end ); UniSession.AddJS('Ext.get("messagebox-1001_header-title-textEl").setText("Подтверждение действия")'); end;
-
Ну, я вижу. Я и спрашиваю, что не так с Sender as... Я неправильно написал его в коде? Мне же надо обратиться к закрываемой вкладке как-то...
-
А что не так с ним? Просто, событие закрытия вкладки присваивается к динамически создаваемым UniTabSheet. Если закрываю вкладку без подтверждения, то все закрывается нормально, без ошибок. Кстати, сейчас заметил, что если сначала вызывается эта ошибка от браузера, то если потом нажать повторно на закрытие вкладки, то она закрывается нормально, без ошибки уже.
-
Даже если я не использую это свойство, то все равно выдается ошибка браузера. Может с моим кодом что-то не то? Ведь ошибка связана с несоответствием классов каких-то, но я не вижу в коде явной ошибки...
-
Hello! My code: procedure TMainForm.UniTabSheet1(Sender: TObject; var AllowClose: Boolean); begin AllowClose:=UniMainModule.AllowClose; if not UniMainModule.AllowClose then begin MessageDlg('Close?',TMsgDlgType.mtConfirmation, mbYesNo, procedure(Sender: TComponent; Res: Integer) var i: Integer; begin if Res = mrYes then begin UniMainModule.AllowClose:=True; i:=0; for i := 0 to (Sender as TUniTabSheet).ComponentCount - 1 do begin if (Sender as TUniTabSheet).Components[i] is TFDConnection then ((Sender as TUniTabSheet).Components[i] as TFDConnection).Connected:=False; if (Sender as TUniTabSheet).Components[i] is TFDQuery then ((Sender as TUniTabSheet).Components[i] as TFDQuery).Close; end; end; end ); UniSession.AddJS('Ext.get("messagebox-1001_header-title-textEl").setText("Подтверждение действия")'); end; end; and I get error: In UniMainModule:
-
How apply this good code to UniForm in UniGUI project?
-
Track the moment of closing some tab in UniPageControl
artem_niko replied to artem_niko's topic in General
The code on this link is good, by the way, yes, it will be useful to me later now. But! My question is not about the tab closing event, namely when the tab was already closed, after it was closed. I need to unload the DLL package simply. If I put the upload code in the tab closing event, the application freezes, because the tab is created dynamically and destroyed by clicking on the button. How to execute the code exactly after closing the tab? -
Track the moment of closing some tab in UniPageControl
artem_niko replied to artem_niko's topic in General
procedure TMainForm.UniPageControl1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin ShowToast('+++'); end; How to execute the code in UniPageControl for the event: "closing some tab"? -
Track the moment of closing some tab in UniPageControl
artem_niko replied to artem_niko's topic in General
What name of demo? -
Good afternoon! Does UniPageControl have some kind of property, event, with which it would be possible to track the moment of closing of some tab? For example, if there are 3 tabs on UniPageControl now, then if some tab is closed, then execute the code. I don't mean the onClose event in UniTabSheet. I need to track, at the UniPageControl level, the moment that some tab closed.
-
Нет примера рабочего, именно с Госуслугами?
-
Так там про Google. Там что, с Госуслугами, также делается? Мне надо просто вызвать форму авторизации на Госуслугах, чтобы пользователь ввел там свои данные, закрыть ее потом, если данные верны, сохранять мне не надо их.
-
-
Возможно... У меня есть домен, но нет пока сервера, на котором бы я расположил свой проект, т.е. Яндекс не может, скорее всего, достучаться до моего компа на локалхост
-
Да, на нем. В этом причина?
-
Like this? <script src="https://captcha-api.yandex.ru/captcha.js" defer></script> <div id="captcha-container" class="smart-captcha" data-sitekey="cdsfdsfsdfsdfsdfsdfsdfsdfsy0JsvFRzTyZZ" ></div> As result: