Jump to content

Aggie85

uniGUI Subscriber
  • Posts

    187
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Aggie85

  1. Howdy Marlon, I just found out I can make it work even with child forms if I create the forms only when needed - I can live with this. The bigger issue I have with the TUniFSMultiUpload component is that you hard-coded the ID=UP301 and so I can only have one instance of the control when I am attempting to create a "grid" of required documents and EACH cell is a TUniFSMultiUpload component with an upload of 1 max file. Any chance of changing it soon to allow multiple instances of the component to be used? If you want to see what I am talking about, just drop two copies of the components with each a differnt OnComplete event and you will see that both component instances will go to the SAME event. Thanks in advance, Aggie85
  2. Howdy! I have been porting my framework that sits on top of whatever framework I am using (VCL / FMX / UniGui). I have always used forms for my base even for embedded objects (child forms). I am trying to use some UniGui controls like Falcon Components TUniFSMultiUpload. It works fine if I use it on a TUniFrame and embed into into a tabsheet on my Main Form. If I try the same with a TUniForm, it renders but the events of the control don't get fired. I am guessing the difference is some kind of message loop or something. Before I start trying to convert my TUniFormBase class to a TUniFrameBase class in my framework, can someone tell me if there is a way to solve this issue? All the best, Aggie85
  3. Howdy! I have been porting my framework that sits on top of whatever framework I am using (VCL / FMX / UniGui). I have always used forms for my base even for embedded objects (child forms). I am trying to use some UniGui controls like Falcon Components TUniFSMultiUpload. It works fine if I use it on a TUniFrame and embed into into a tabsheet on my Main Form. If I try the same with a TUniForm, it renders but the events of the control don't get fired. I am guessing the difference is some kind of message loop or something. Before I start trying to convert my TUniFormBase class to a TUniFrameBase class in my framework, can someone tell me if there is a way to solve this issue? All the best, Aggie85
  4. The current TUniFileUploadButton isn’t very UI customizable. I am going to look at the code today and see if I can quickly roll my own or just have to live with no file drop. I just looked at the source code for TUniFileUploadButton and I am guessing it was written before client-side layout was encouraged. If it was written to support client side layout, I could just place it "transparent" on top of my HTML formatted TUniLabel and get the functionality I wanted. Is there any way to to do THAT?
  5. That example doesn't concern me because I am NOT using the TUniFileUploadButton visible; remember, I want a more polished look-n-feel that I can't do with the button itself and you suggested I use another control and bind it to the hidden TUniFileUploadButton. Is it possible to do that and get the click + drop site or do I have to give up the drop site?
  6. I can map just the click: void __fastcall TCompanyReviewAndSubmitPageForm::OnIdentificationCardFileUploadContainerPanelClick(TObject *Sender) { IdentificationCardFileUploadButton_->JSInterface->JSCall(L"fileInputEl.dom.click",ARRAYOFCONST((EMPTY_STRING))); } And that works to display the Browse For File dialog, but it doesn't implement the file drop method. So how do I get the IdentificationCardFileUploadButton_ (which is hidden) to listen for the click (or filedrop) on my container panel?
  7. Sherzod, I have the following C++ code below (should be easily readable): void __fastcall TCompanyReviewAndSubmitPageForm::OnUniFormReady(TObject *Sender) { IdentificationCardFileUploadButton_->JSInterface->JSAddListener ( L"click", Format(L"function() {%s.fileInputEl.dom.click()}",IdentificationCardFileUploadButton_->JSName), IdentificationCardFileUploadContainerPanel_ ); } The problem I am running into is the THIRD parameter above (an instance of a TUniContainerPanel) needs to be a Extpascal::TExtObject *. Where do I get the TExtObject * for a TUniContainerPanel? Thanks in advance, Aggie85
  8. So basically setup whatever other control I want to give me the look I want and then map the TUniFileUpload click method to the actual UI click event
. That should work
I will try tomorrow when I get back to my office. ‘Thanks,
  9. I am just looking for it to work as provided but with the following changes: 1) Set the Caption to something like I posted above. 2) Center the above 'item' from #1 - that is, maybe allow the TUniFileUploadButton to have a TLayout / TLayoutAttributes so it can be setup for client side. A simple example of the image / text I am looking for is in the attached zip file. Thanks in advance. UploadButtonHtml.zip
  10. I was hoping that I could place the above inside the caption and automatically get a "pretty" file upload drop area and attempt to apply some attempt to make it responsive....after spending the llast several hours, I am ..... Is it possible to place an image/text into the caption of the TUniFileUploadButton component and have it stay centered if its parent window is resized. Please remember I am attempting to write a responsive app with the desktop components of UniGui.
  11. Howdy! I would like to put my own image / message in the caption of a TUniFileUploadButton and have it automatically sized/centered on the client even if the window is resized. Here is my CSS / Caption text I want to use: CSS: .UploadFileItem { vertical-align: top; display: inline-block; text-align: center; width: 120px; } .UploadFileImage { width: 100px; height: 100px; background-color: grey; } .UploadFileCaption { display: block; } Caption HTML: <div class="UploadFileItem"> <img class="UploadFileImage" src="UploadFile.svg"/> <span class="UploadFileCaption">Please drop or click to select your identification card image</span> </div> Any suggestions on how to do this? All the best, Aggie85
  12. OK - the ParentFont seems to be the MAGIC I was looking for! Thanks, Aggie85
  13. Sherzod, I am very familiar with css fonts
my question was pertaining to UniGui / ExtJS if there was a simple way to set the default font rendering size for all edits / labels to 1rem to allow. From my limited experience with unigui / ExtJS, just applying your own CSS can cause issues with all the framework CSS if you don’t know what you are doing. So I have been setting the font sizes in the IDE for each control at a size of 9 which is 15px (not quite 1rem). So is there an easy way in unigui to default all edits / labels / field labels to 1rem or is the aforementioned Parent form DefaultFont the answer?
  14. Howdy All! Is there an EASY way to change the font size for all TUniLabels / TUniEdits / TUniMemos to use a default font size of 1rem (16px)? I can write a routine to loop through all the controls on a form, but before I start doing that, I figured I would ask if there is an easier way? And what is the default font size of 1rem in the Delphi font system? All the best, Aggie85
  15. Howdy! If you compile and run the attached test app, you will see that eventually the right border of my two cards (TUniPanels) get clipped. Could someone please tell me how to fix this? All the best, Aggie85 UniGuiResizingIFrame.zip
  16. Howdy All! What is the best way to remove ALL borders / margins / paddings from a TPageControl and its TUniTabSheet children? I basically just want them to be empty containers that only follow the specific layout I give them with NO extra space. All the best, Aggie85
  17. Howdy, I recently had to abandon using a TPageControl for multiple pages of controls because it was interfering (adding to many layers / extjs css) with my attempt to create a responsive app with desktop controls. I now create / delete pages (Child forms inserted into a container panel on the main form). is there away to remove and hide a child form without having to delete / recreate it? That is, what is an alternative to using a page control like the old VCL TNoteBook container? Thanks in advance, Aggie85
  18. I need to play with it some more today. ExtJS really needs to come out with a flex grid. Without one, attempting to write responsive apps when needed is overly complicated.I have spent days on what would have taken less than an hour with a flex grid. Thanks again for the help.
  19. OK ... the following resize event on the owners panel seems to be working other than I have a few sizing issues: function resize(sender, width, height, oldWidth, oldHeight, eOpts) { var panels = sender.items ? sender.items.items : []; Ext.each(panels, function (panel) { if (panel.getSize().width < 525) { panel.getLayout().setVertical(true); } else { panel.getLayout().setVertical(false); } panel.updateLayout(); }); }
  20. OK - I spoke to soon. The problem with putting a "resize" event handler on each panel is the layout manager gets "trumped" if the user starts resizing the browser window (i.e. several resize calls). In Windows, I would have a "resize" event on the parent container and then reset a timer everytime the resize gets called so that the "relayout" only happens ONCE! As you have figured out, I know just enough JS to be dangerous. Any example or direction on how to do the above?
  21. Thanks! Now I have a starting point for a responsive "panel-card" system. I have a few more things to try and modify on the fly, so I will probably be posting later tonight! Again, thanks for the help. Aggie85
  22. OK... how do I convert the following server side to client side: rocedure TMainForm.UniButton1Click(Sender: TObject); begin //UniContainerPanel1.Layout := 'vbox'; UniContainerPanel1.JSInterface.JSCall('getLayout().setVertical', [True]); //vbox UniContainerPanel1.JSInterface.JSCallDefer('updateLayout', [], 20); end;
  23. I updated the OwnerPanels with the following resize function: function resize(sender, width, height, oldWidth, oldHeight, eOpts) { if (width < 600) { sender.setLayout({type: "vbox"}); } else { sender.setLayout({type: "hbox"}); } sender.updateLayout(); } and I am getting the following error: Uncaught TypeError: Cannot read properties of undefined (reading 'dom') at ctor.moveItem (ext-all.js:20:1238717) at ctor.renderItems (ext-all.js:20:1238043) at ctor.renderChildren (ext-all.js:20:1244092) at ctor.invalidate (ext-all.js:20:2315522) at ctor.invalidate (ext-all.js:20:2315615) at ctor.flushInvalidates (ext-all.js:20:2314129) at ctor.run (ext-all.js:20:2318736) at Function.flushLayouts (ext-all.js:20:558543) at Function.updateLayout (ext-all.js:20:559046) at ctor.updateLayout (ext-all.js:20:589121)
×
×
  • Create New...