-
Posts
635 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
Events
Posts posted by artem_niko
-
-
On 11/23/2022 at 5:43 PM, Sherzod said:
Have you added this code?
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. -
2 hours ago, Sherzod said:
Hello,
Perhaps some components are also removed that are not recreated.
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. -
1 minute ago, Sherzod said:
procedure(ASender: TComponent; ARes
Блин, гениально и просто... Спасибо!
-
1 minute ago, Sherzod said:
Конечно не поможет, видите ещё один Sender?
Ааа, понял, конфликт Sender'ов...
Но, а как без него использовать MessageDlg?
-
3 minutes ago, Sherzod said:
Вот и причина ошибки...
Я заменил на это, но ничего не помогло:
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;
-
3 minutes ago, Sherzod said:
Ну, я вижу.
Я и спрашиваю, что не так с Sender as...
Я неправильно написал его в коде? Мне же надо обратиться к закрываемой вкладке как-то...
-
4 minutes ago, Sherzod said:
Обратите внимание на Sender as...
А что не так с ним?
Просто, событие закрытия вкладки присваивается к динамически создаваемым UniTabSheet.
Если закрываю вкладку без подтверждения, то все закрывается нормально, без ошибок.
Кстати, сейчас заметил, что если сначала вызывается эта ошибка от браузера, то если потом нажать повторно на закрытие вкладки, то она закрывается нормально, без ошибки уже.
-
8 minutes ago, Sherzod said:
In such a case, you should not use callback...
Даже если я не использую это свойство, то все равно выдается ошибка браузера.
Может с моим кодом что-то не то? Ведь ошибка связана с несоответствием классов каких-то, но я не вижу в коде явной ошибки...
-
On 11/5/2021 at 7:25 PM, estrify said:
Hi,
One possible solution (with EnableSynchronousOperations=False) :
... private { Private declarations } AllowClose_UniTabSheet3: Boolean; ... procedure TMainForm.UniTabSheet3BeforeFirstActivate(Sender: TObject; var AllowActivate: Boolean); begin AllowClose_UniTabSheet3:=False; end; procedure TMainForm.UniTabSheet3Close(Sender: TObject; var AllowClose: Boolean); begin AllowClose:=AllowClose_UniTabSheet3; if not AllowClose_UniTabSheet3 then begin MessageDlg('Close?', TMsgDlgType.mtInformation, mbYesNo, procedure(Sender: TComponent; Res: Integer) begin if Res=mrYes then begin AllowClose_UniTabSheet3:=true; UniTabSheet3.Close(); end; end ); end; end;
Regards,
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:
-
10 hours ago, irigsoft said:
Hmmm...thank you!
-
On 6/23/2022 at 9:18 PM, Wizard said:
minimize window working example
https://fiddle.sencha.com/#view/editor&fiddle/3kc1How apply this good code to UniForm in UniGUI project?
-
6 minutes ago, Sherzod said:
This post may help you:
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?
-
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"?
-
27 minutes ago, Sherzod said:
Hello,
Please see the related demos.
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. -
5 minutes ago, Sherzod said:
Ну принцип похож, да.
Нет примера рабочего, именно с Госуслугами?
-
On 12/20/2022 at 10:54 PM, Sherzod said:
Добрый вечер,
Что-то вроде этого:
Так там про Google.
Там что, с Госуслугами, также делается?
Мне надо просто вызвать форму авторизации на Госуслугах, чтобы пользователь ввел там свои данные, закрыть ее потом, если данные верны, сохранять мне не надо их.
-
On 9/27/2017 at 1:18 AM, Sherzod said:
Hi,
At the moment you can add these CSS classes in viewer.css: (\FMSoft\Framework\uniGUI\uni-1.0.0.xxxx\pdf.js\web)
.download { display:none !important; } .print { display:none !important; } .openFile { display:none !important; }
Or by changing viewer.html by adding hidden class...
Please, for check, do not forget to clear your browser's cache
A similar request:
http://forums.unigui.com/index.php?/topic/8894-unipdfframe-improvement-request/
Try...
Best regards,
Hello!
How hide this button?
-
On 2/24/2019 at 2:59 AM, Sherzod said:
Hello,
Because pdfjs does not support themes, one possible solution, you need to change viewer.css ( for example in a folder \FMSoft\Framework\uniGUI\uni-1.70.0.14xx\pdf.js\web )
Just add the following css rules at the end, and don't forget to clear your browser's cache:
#viewer, #toolbarViewer { background-color: green !important } .toolbarButton, .secondaryToolbarButton, .overlayButton { background-color: orange !important; }
Hello!
How change font color in caption and background color of popupmenu?
-
10 minutes ago, Sherzod said:
Думаю, да. Я не смотрел документацию, но мне кажется Вы должны указать конкретный домен.
Возможно...
У меня есть домен, но нет пока сервера, на котором бы я расположил свой проект, т.е. Яндекс не может, скорее всего, достучаться до моего компа на локалхост
-
59 minutes ago, Sherzod said:
Вы тестируете на localhost?
Да, на нем.
В этом причина?
-
5 minutes ago, Sherzod said:
Try adding the script directly to the HTMLFrame.
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:
Show text in top left corner in UniDBGrid
in General
Posted
Hello!
How add text here?
This is top left corner in UniDBGrid. I need show some text in this place.