Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation since 02/19/24 in all areas

  1. uniGUI Floating Buttons (simple but useful) This is a very simple project that shows how to use floating buttons anchored to the main browser window or your form. I already left the JS code calling ajaxrequest to select the correct buttons for your UI. So, just choose the icons, the best model and see in the CSS where you change it to leave it in one format or another. I already commented on where to change the CSS code. project411-floatingbutton.rar FloatingButtons2.mp4 FloatingButtons.mp4
    3 points
  2. Good afternoon, the reason it doesn't work is that it requires on mobile https example https://192.168.1.xxx:8077
    2 points
  3. Unigui has always been alive. 😀
    2 points
  4. Finally ..My code completed. function beforeInit(sender, config) { config.listeners = { keyup: function(textarea) { var inputEl = textarea.inputElement; textHeight = inputEl.dom.scrollHeight; if (textarea.getValue() == '') { textHeight=35; } if (textHeight != textarea.getHeight()) { var H1 = textHeight; var H2 = textarea.getHeight(); if (H1<=35*4) { textarea.setHeight(textHeight); } ajaxRequest(sender,'_resize',{newH: H1, oldH: H2}); } } } }
    2 points
  5. Why make our lives easy? This should be the basic component (DB and otherwise) used by everyone. And instead it is ignored, making our lives very difficult for simple cases... 🙂 ++++++++++++1
    2 points
  6. Всё верно, на сервере нужно ставить "рантайм", причем лучше не копированием папки, а запускать Install. А еще такая надпись (Loading...) появляется, когда вы на локальном компе компилируете, например, под версией 1.95, а сервере установлена 1.94 или 1.96, про это тоже забывать не надо.
    2 points
  7. Добрый день,
    2 points
  8. Good afternoon @Sherzod, yes, with a lot of research and testing I got where I needed to be, now my buttons are responding to clicks as I planned, it looks very good. I'm going to make a brief tutorial and put it here in this thread to help others who need it. Thank you very much.
    2 points
  9. They are used to customize ExtJS Themes. And in the case of uniGUI, they are useless...
    1 point
  10. Hello @Sherzod, I am implementing kanban in a unigui application and I need to drag and drop any component between panels. I've seen some "solutions" with treeview but do not satisfy my case. Is there a ready solution in unigui for this case?
    1 point
  11. I modified the code. Move the code to the OnReady event, that's why I asked where you use the code... One possible solution: procedure TMainmForm.UnimFormReady(Sender: TObject); begin with UnimContainerPanel1 do begin JSInterface.JSCall('bodyElement.setStyle', ['background', 'url('+UnimImage1.CurrImgUrl+')']); end; end;
    1 point
  12. Для всех кнопок: MainmForm.Script -> Ext.define(null, { override: 'Ext.Button', initialize: function () { this.callParent(arguments); this.buttonElement.dom.setAttribute('title', this.id || ''); } });
    1 point
  13. Ну, да, для alt использовалось имя компонента. Мы попробуем в следующих версиях добавить этот тег... Также в качестве обходного пути Вы можете проанализировать это решение и добавить обработку этого тега:
    1 point
  14. Hello, You should use UnimHTMLFrame for this, for example: UnimHTMLFrame.HTML -> <iframe width="420" height="345" src="https://www.youtube.com/embed/7zPGl4fXkpI"></iframe> https://www.w3schools.com/html/html_youtube.asp
    1 point
  15. I always tell myself: one step forward, taking a little time is better than two steps forward quickly and two steps back. God bless all Unigui Team.
    1 point
  16. Добрый день, Этот пост может Вам помочь:
    1 point
  17. Hi @mikromundo, it worked using i *PnP.width; I was intrigued by the solution, thank you very much for the tip, it solved my problem. Congratulations on the Radcore project, I didn't know it, I was delighted with its practicality. I'll study a little more. Congratulations indeed!!
    1 point
  18. 1 point
  19. Вы можете использовать клиентское событие: function resize(sender, width, height, oldWidth, oldHeight, eOpts) { }
    1 point
  20. Все прошло нормально. Я просто побоялся, что после переустановки фреймворка придется переустанавливать и другие компонентьі, которьіе созданьі на базе uniGUI. Не пришлось 👍
    1 point
  21. One possible solution: procedure TMainmForm.UnimFormCreate(Sender: TObject); begin UnimPanel1.JSInterface.JSAddListener('painted', 'function(){this.bodyElement.setStyle("border", "none"); this.bodyElement.setStyle("border-bottom", "1px solid");}') end;
    1 point
  22. Can you make a simple app?
    1 point
  23. @newsanti Also try this approach: procedure TMainmForm.UnimFormCreate(Sender: TObject); begin UnimEdit1.JSInterface.JSAddListener('painted', 'function(){this.inputWrapElement.setStyle("border", "none")}') end;
    1 point
  24. Problem solved. Below I show how I did it. This is a way to silently print PDF documents. I used the project: https://github.com/imTigger/webapp-hardware-bridge You install the Windows client: https://github.com/imTigger/webapp-hardware-bridge/releases/tag/0.14.0 In the Delphi code: function LoadJavaScriptFromFile(const FileName: string): string; var FileStream: TFileStream; StreamSize: Int64; Buffer: AnsiString; begin Result := ''; FileStream := TFileStream.Create(FileName, fmOpenRead or fmShareDenyNone); try StreamSize := FileStream.Size; SetLength(Buffer, StreamSize); FileStream.Read(Buffer[1], StreamSize); Result := String(Buffer); finally FileStream.Free; end; end; [...] var JavaScriptCode: String; [...] JavaScriptCode := LoadJavaScriptFromFile(UniServerModule.StartPath+'files\res\js\websocket-printer.js'); JavaScriptCode := StringReplace(JavaScriptCode, '$url$', '"ws://127.0.0.1:12213/printer"', [rfReplaceAll]); JavaScriptCode := StringReplace(JavaScriptCode, '$typ$', ''''+UniApplication.Parameters.Values['gabinet']+'''', [rfReplaceAll]); JavaScriptCode := StringReplace(JavaScriptCode, '$pdfbase64$', ''''+pdf_base64+'''', [rfReplaceAll]); UniSession.AddJS(JavaScriptCode); Of course, adapt the variables to your needs. The PDF file must be converted to Base64 without line-ending enters. websocket-printer.js
    1 point
  25. News All components are compatible with the Delphi 12 Athens and latest version of uniGUI 🚀 https://store.falconsistemas.com.br [FSCamera ] Fixed canvas alignment problem; [FSQrCodeScanner ] Added support for camera listing; [FSSiganture] Fixed canvas alignment problem; [FSToast] Fixed ButtonText problem at design time; Updated Installer; https://demos.falconsistemas.com.br/?tela=tfrmsignature
    1 point
  26. Sherzod C++: bool tbool=False; UniChart1->JSInterface->JSCall("chart.series[0].setStacked", ((tbool))); works, thanks so much!
    1 point
  27. Please search the forum for "touchstart".
    1 point
  28. https://unigui.com/explore/unigui-roadmaps/unigui-roadmap-2024-q1-q2
    1 point
  29. One possible solution: OnFrameReady -> procedure TframeInfo.UniFrameReady(Sender: TObject); begin fsInfo.JSInterface.JSCall('setScrollable', [True]); end;
    1 point
  30. This approach may help you: UnimMemo1.ClientEvents.UniEvents -> function beforeInit(sender, config) { config.listeners = { keyup: function(textarea) { var inputEl = textarea.inputElement, textHeight = inputEl.dom.scrollHeight; textarea.setHeight(textHeight); } } }
    1 point
  31. Hello, Any news about this? Maybe put this feature in the roadmap?
    1 point
  32. Please forget the orientation problem, I messed up with the Cookie expiring date/time. Regards J
    1 point
  33. Maybe you wanted something like this? tbTeam.ClientEvents.UniEvents -> function afterCreate(sender) { sender.setBodyProp('minHeight', '100%'); }
    1 point
  34. Sherzod Good news, success! I had some time to double check everything. There was a } character missing in the afterrender event, causing the freeze. Finally I was able to display 3 new titles for a UniBarSeries using the C++ code UnicodeString TestStr1, TestStr2, TestStr3; TestStr1 = "Test1"; TestStr2 = "Test2"; TestStr3 = "Test3"; UniChart3->JSInterface->JSCall("_setTitle", ARRAYOFCONST((TestStr1,TestStr2,TestStr3))); No need for using SetTitle(). Thank so much, you're a genius!
    1 point
  35. насколько я знаю, так юзают. работает обычно
    1 point
  36. Sherzod Thanks, I will try the method above and report back. I was able to make some progress on the C++ code. The following C++ code for SetTitle compile under C++ Builder 10.4. void __fastcall TMainForm::SetTitle(TUniBarSeries *AUniSeries, UnicodeString ATitle) { int I; UnicodeString Titles = ""; if ((ATitle != "") && (AUniSeries->Title != ATitle)) { AUniSeries->Title = ATitle; for (I=0; I<AUniSeries->Parent->SeriesList->Count; I++) { TUniBarSeries *BarSeries = new TUniBarSeries(AUniSeries->Parent); BarSeries = (TUniBarSeries *) AUniSeries->Parent->SeriesList->Series[I]; Titles = Titles + "\"" + BarSeries->Title + "\","; } Titles = RemoveTrailingChar(Titles, ','); // Up until here Titles agree with running in Delphi, yet series Titles are not updated on chart when the next line is executed AUniSeries->Parent->JSInterface->JSCall((UnicodeString)L"chart.series[0].setTitle",ARRAYOFCONST((Titles))); } } In debug mode, it generates exactly the same output in Titles when compared to running in Delphi. Yet, the labels are not updated on the chart. So we now only have one line of Delphi code that we need to get a working C++ translation. DELPHI: with AUniBarSeries.Parent.JSInterface do JSCall('chart.series[0].setTitle', [JSArray(Titles)]); C++: AUniSeries->Parent->JSInterface->JSCall((UnicodeString)L"chart.series[0].setTitle",ARRAYOFCONST((Titles)));
    1 point
  37. A hidden panel is a uniGUI container which will not be shown. Its goal is to contain other components which will be used by other components (like the column editors for a grid). https://www.unigui.com/doc/online_help/api/uniPanel_TUniHiddenPanel.html
    1 point
  38. Hello, Well, when let's say UniEdit is set to ReadOnly on the server side, any changes made on the client side will not be taken into account on the server side.
    1 point
  39. Dears, I was finally able to do something: If one day, you will have to develop an Unigui app: - Under local network, - Without Internet, - Which requires an SSL (example Scann Camera) Then read the following: I thought, wrongly to create "Self Signed Certificate". Today, most of browsers reject them. So, after 3 days search, I understood that it was necessary to use another technic : Create a localhost Certificate by mkcert This is inspired by (thx to the Author) : https://technixleo.com/create-locally-trusted-ssl-certificates-with-mkcert-on-windows OK...Step by Step : 1. Installing mkcert on Windows 1.1 mkcert can be installed by Chocolatey To install Chocolatey, you must first ensure the Policy AllSigned Open PowerShell as Admin Get-ExecutionPolicy if Restricted then : Set-ExecutionPolicy AllSigned 1.2 To install Chocolatey see https://chocolatey.org/install In PowerSehlle type (in a single line): Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1')) 1.3 install mkcert In PowerSehlle type: choco install mkcert The mkCert Directory (by default) is: C:\Users\...\AppData\Local\mkcert 2. Generate my 2 pem files In PowerSehlle type: mkcert -install This will generate 2 files in C:\Users\...\AppData\Local\mkcert: rootCA.pem rootCA-key.pem 3. Generate a localhost.p12 Certificate In PowerSehlle type: mkcert -pkcs12 localhost This will generate localhost.p12 certificate which will be in the PowerShell directory, ie: ..\System32 4. Import the localhost Certificate Touche Win + R key: mmc File > Add > Certificates > Add Computer account local computer OK Right click / on WEB Hosting Certificates > All Tasks Machine Room Select localhost.p12 Certificate Next specify the password (default): changeit Check: Key Exportable Place of the Certificate on : Web Hosting (dépend on your windows langage : example for french : Hébergement Web) This will create 2 Certificates (in Web Hosting): - localhost - mkcert myDESKTOP-xxx 5. Project Unigui Requires 3 files: cert.pem key.pem root.pem Do not use root.pem = rootCA.pem ( C:\Users\...\AppData\Local\mkcert ) key.pem = rootCA-key.pem ( C:\Users\...\AppData\Local\mkcert ) wich are generated by mkcert. Use instead the new 3 files, obtained online (by converting the p12 file in a new global pem file) 5.1 Split localhost.p12 into 3 Files You can obtain the 3 files via a conversion of the Certificate: localhost.p12 Use Online: https://www.sslshopper.com/ssl-converter.html - Upload the Certificate File: localhost.p12 - indicate the type: PFX/PCKC#12 - Convert To: Standard PEM - Password: changeit You will get global File, containing 3 blocks : start ...end Separate them with Notebook, and save them into 3 files: The first = cert.pem The second = root.pem The third = key.pem 5.2 Compile your project and run it : https://localhost:8077/ is Secure Have fun... ___________________ PS: if you are interesting by an easy way to scan BareCode via your Android device (wich requires an SSL url) you can use Falcon Store - Components Delphi from our Friend Marlon. Very fast and light ! http://forums.unigui.com/index.php?/topic/11359-falcon-store-components-delphi-httpsstorefalconsistemascombr/#comment-60260
    1 point
  40. Hi do you have any exemple how its works in unigui ? Thanks
    1 point
  41. You can use UniChart.InsetPadding property.
    1 point
  42. Hello, Maybe you wanted like this: UniDBGrid.ClientEvents.UniEvents -> function pagingBar.beforeInit(sender, config) { config.displayInfo=true; }
    1 point
  43. For example JS code: MainmForm.UnimPanel1.bodyElement.dom.style.setProperty('border-color', 'green', 'important');
    1 point
  44. procedure TMainForm.UniPDFFrame1FrameLoaded(Sender: TObject); begin // download button UniSession.AddJS (UniPDFFrame1.JSName + '.iframe.contentWindow.document.' + 'getElementById ("download").style.display = "none"'); UniSession.AddJS (UniPDFFrame1.JSName + '.iframe.contentWindow.document.' + 'getElementById ("secondaryDownload").style.display = "none"'); // open file button UniSession.AddJS (UniPDFFrame1.JSName + '.iframe.contentWindow.document.' + 'getElementById ("openFile").style.display = "none"'); UniSession.AddJS (UniPDFFrame1.JSName + '.iframe.contentWindow.document.' + 'getElementById ("secondaryOpenFile").style.display = "none"'); // view bookmark button UniSession.AddJS (UniPDFFrame1.JSName + '.iframe.contentWindow.document.' + 'getElementById ("viewBookmark").style.display = "none"'); UniSession.AddJS (UniPDFFrame1.JSName + '.iframe.contentWindow.document.' + 'getElementById ("secondaryViewBookmark").style.display = "none"'); // documentProperties UniSession.AddJS (UniPDFFrame1.JSName + '.iframe.contentWindow.document.' + 'getElementById ("documentProperties").style.display = "none"'); end;
    1 point
×
×
  • Create New...