Jump to content

Frederick

uniGUI Subscriber
  • Posts

    608
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by Frederick

  1. 51 minutes ago, Frederick said:

    In the OnAjaxEvent of the button, I have the following:-

       if SameText(EventName, 'customEvent') then begin
          ShowMessage(Params['name'].AsString + '  ' + Params['width'].AsString);
       end;

    I changed the following code and even the event name is not shown:-

    showmessage(EventName);

    {

       if SameText(EventName, 'customEvent') then begin
          ShowMessage(Params['name'].AsString + '  ' + Params['width'].AsString);
       end;

    }

  2. In the form's OnCreate event, I have the following code:-

       spdCopy.ClientEvents.ExtEvents.Values['click']:='function click(sender, e, eOpts) '+
          ' { '+
          ' var textarea = document.getElementById("'+edtPaylink.JSName+'_id-inputEl"); '+
          ' textarea.select(); '+
          ' try { '+
          ' var successful = document.execCommand(''copy''); '+
          ' if(successful) var text=''Copied!''; '+
          ' else var text = ''Unable to copy!''; '+
          ' } catch (err) { '+
          ' var text = ''Unsupported Browser!''; '+
          ' } '+
          ' }';
     

    In the TUniSpeedButton's ClientEvents.ExtEvents's click event, I have the following code:-

    function click(sender, e, eOpts)
    {
        ajaxRequest(sender, 'customEvent',
                   {
                      name: sender.text,
                      width: sender.getWidth()
                   }
                 );
    }

    In the OnAjaxEvent of the button, I have the following:-

       if SameText(EventName, 'customEvent') then begin
          ShowMessage(Params['name'].AsString + '  ' + Params['width'].AsString);
       end;
     

    There is no message shown after the button is clicked. What am I missing here?

  3. 1 hour ago, Sherzod said:

    Hello, you can use js alert method or send a request to server using ajaxRequest method. 

    Thanks. I replaced "console.log()" with "alert()" and the dialogue box is shown but it is ugly. Is it possible to change it so that it displays like a ShowMessage() or using SweetAlert()?

    jsalert.png

  4. On 12/16/2016 at 2:01 PM, Hayri ASLAN said:
    btnCopyToClipboard.ClientEvents.ExtEvents.Values['click']:='function click(sender, e, eOpts) '+
          ' { '+
          ' var textarea = document.getElementById("'+memSummary.JSName+'_id-inputEl"); '+
          ' textarea.select(); '+
          ' try { '+
          ' var successful = document.execCommand(''copy''); '+
          ' if(successful) console.log(''Copied!''); '+
          ' else console.log(''Unable to copy!''); '+
          ' } catch (err) { '+
          ' console.log(''Unsupported Browser!''); '+
          ' } '+
          ' }';

    I use the above code to copy a TUniEdit text property to the clipboard. How do I notify the user by way of a dialogue box upon completion instead of logging it to the console?

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1560)

  5. 3 hours ago, Marlon Nardi said:

    Thanks for the feedback!
    I will review the installer, there are really few users who use 64 bits.

    You are welcome.

    May I suggest the following improvements:-

    1. Since the installer removed my library path to the SOURCES directory before installation, it should set it back after
    2. There is no point in creating the UniFalcon\Lib\Delphi\LibD26x64 if it is going to be empty
    3. Since the manual installation of the package is required, display it prominently in the dialogue box when the installation is completed
    4. You may want to create an INSTALL.TXT file that contains installation instructions for new and existing users
  6. I managed to get the installation working by doing the following:-

    1.   Open the package file for Delphi 10.3 Rio and installed the components. (Missed the post-installation instructions in the installer) I was also confused why the installation of the components was carried out when the platform was Windows 32 bit in Delphi although I selected Win 64 bit for the platform during installation.

    2.  Added a library path to the SOURCES directory

    • Thanks 1
  7. Hi Marlon,

    I ran the installer and selected Win64 as the platform and Delphi 10.3 Rio as the Delphi version. After installation, the sub-directory of UniFalcon\Lib\Delphi\LibD26x64 is empty.

    If I perform the installation again using the same parameters as above, UniFalcon\Lib\Delphi\LibD26 contains files but UniFalcon\Lib\Delphi\LibD26x64 still contains nothing.

    My 64 bit program now cannot compile because Delphi is complaining that files are missing.

    What do I do now?

  8. Hi Marlon,

    I downloaded the latest components and in the Packages sub-directory, there is no TUniFalcon26.dpk file but it is in my current directory. I believe this package file is for Delphi Rio, which I use.

    How do I update my current UniFalcon installation to the latest version?

    BTW, where is the package file for Delphi 10.4 Sydney?

  9. 5 hours ago, Marlon Nardi said:

    I sent it again, if you prefer I can answer here.

    Thanks. I still did not receive the email. Here is the message I sent.

    I have the following questions regarding this control (version 1.0.2.47):-

    1.    I want to display two lines, one below the other, and my text is 'One or more fields have been changed.'+#13#10+'Do you wish to cancel the change(s)?'. However, TUniFSConfirm is not doing so. Please see attached screenshot. How do I get this to work?

    2.    I want the user to be able to press the ESCAPE key to close the dialogue box. However, when I press the ESCAPE key, the control simply shakes. The property for EscapeKey is set to True. How do I get this to work?

    3.    How do I focus to the No button by default so that when the user presses the Enter key, that button is selected?

    4.    I want the control to always pop up from the centre of the screen and not from the left to right. For some reason, when it is displayed the first time, it is centered. However, it displays from the left to right the second time. How do I do this?

    fsconfirm.png

  10. 6 hours ago, Sherzod said:

    Yes, it seems the FocusCancel property is not working.

    Workarounds:

    1. Using the ReverseButtons property.

    2. Or use this code for now:

      UniSweetAlert1.Show;
      JSInterface.JSCode('let cbtn=Ext.query(".swal2-cancel")[0]; if (cbtn) {cbtn.focus()};'); //<------

     

    The first option switches the display order of the buttons but the Cancel button is not highlighted.

    I am using the second option but the Cancel button is also not highlighted. How can I do this?

  11. If I press the Tab key in a Sweetalert dialogue box and then press ENTER, the dialogue box is re-displayed.

    Pressing ENTER a second time causes the dialogue box to close but the event message is not displayed.

    Can the Tab key be suppressed so that this behaviour does not happen?

    Note: This is based on the demo files of SweetAlert.

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1558)
     

  12. I have a Confirm and a Cancel button in a SweetAlert dialogue box. However, I want to the Cancel button to be focused so that it is the default action.

    The FocusCancel property seems to be the one to use but setting it to True does not cause the Cancel button to be focused. What am I missing here?

    Note: This is based on the demo files of SweetAlert.

    --
    Frederick
    (UniGUI Complete - Professional Edition 1.90.0.1558)
     

  13. I created two free forms giving them each a name of frmFree1 and frmFree2 respectively.

       if cMenu='mnu1' then begin
          oForm:=frmFree1;  // Compiler chokes here and says "Undeclared Identifier frmFree1"
         end
       else if cMenu='mnu2' then begin
          oForm:=frmFree2;  // Compiler chokes here and says "Undeclared Identifier frmFree2"
       end;

    even when the units for the two forms are in the Uses clause.

    I can't create the free form dynamically because I need to design the form itself with controls and components there.

    I'll need to research further since I have never used free forms in UniGUI before.

  14. I am not sure what I am doing wrong but the forms are not displaying inside the TUniTabSheet of the TUniPageControl.

    I have two application forms and my code when each TUniMenuItem is clicked is:-

    procedure TMainForm.mnu1Click(Sender: TObject);
    var
       cMenu : String;
    begin
       cMenu:=treMenu.SourceMenu.Items[treMenu.Selected.Id].Name;
       if assigned(oForm) then
          oForm.Close;
       oForm:=NIL;
       if cMenu='mnu1' then begin
          oForm:=frmForm1;
         end
       else if cMenu='mnu2' then begin
          oForm:=frmForm2;
       end;
       if assigned(oForm) then
          oForm.Parent:=tab1;
    end;

    However, the application forms are displayed outside the main form. What could be the problem?

×
×
  • Create New...