Jump to content

Kurt

uniGUI Subscriber
  • Posts

    19
  • Joined

  • Last visited

Posts posted by Kurt

  1. Hello,

    How to listen to browser focus? for example the user goes to other window and go back to the browser, i want to call ajax event

    Thanks

  2. On 3/2/2024 at 12:39 AM, Muhammad Idris said:

    How to run it in Unigui?

    install pdftk in your environment


    and you can use this code:
     

    procedure MergeAndEncryptPDFs(const AInputFiles: string; const AOutputFile: string; const AUserPassword: string);
    var
      CommandLine: string;
      StartupInfo: TStartupInfo;
      ProcessInfo: TProcessInformation;
    begin
      CommandLine := 'pdftk ' + AInputFiles + ' cat output ' + AOutputFile + ' user_pw ' + AUserPassword;
    
      FillChar(StartupInfo, SizeOf(StartupInfo), 0);
      StartupInfo.cb := SizeOf(StartupInfo);
    
      if CreateProcess(nil, PChar(CommandLine), nil, nil, False, 0, nil, nil, StartupInfo, ProcessInfo) then
      begin
        WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
        CloseHandle(ProcessInfo.hProcess);
        CloseHandle(ProcessInfo.hThread);
    	end
    	else
    		raise Exception.Create('not created');
    end;


    to call it:

     

    procedure TMainForm.UniButton1Click(Sender: TObject);
    var 
    	OutPdf: string;
    begin
    	OutPdf :=  UniServerModule.NewCacheFile('pdf', fileName);
    	MergeAndEncryptPDFs('example1.pdf,example2.pdf', OutPdf, '');
    end;


    you can modify the code to omit the password protection for your pdf.

    hope it helps

     

  3. Hi,

     

    Correct me if im wrong, if i have a websocket enabled in my app and im using a hyper server, the number of websocket is also the same with the number of nodes in my hyperserver? if so does it mean if im in different node, i wont be able to receive the websocket message from other node?

    thank you

    • Like 1
  4. 16 hours ago, Sherzod said:

    How do you edit the grid?

    i click a button, then the current row moves to the next row then i want to highlight the row that changed.

     

     

    16 hours ago, Sherzod said:

    Where did you get this code?

    i read the documntation of ext js

  5. hi,

     

    sorry for not clear explanation. i want to utilize the paged options of unidbgrid. for example in my query:
     

    SELECT * FROM products LIMIT :limit,25

    so when i clicked the Next Page of the UniDBGrid, i want to re-execute my query using the new start parameter and apply it to :limit paramter.

    image.thumb.png.c629a230faedc3019c3164da7f136475.png

  6. Hi,

    how to override the UniDBGrid.WebOptions.Paged behavior? 

    for example if i clicked the next page of the grid, i want to execute my query and pass the limit and offset coming from the grid?

    thank you..

  7. Hi,
     

    I want to be able to use a function from a javascript file. this is my js file "Win32/Debug/files/js/app.js"
    image.png.7be30daf46d997b7e2848097cc8b947c.png

    i want to reuse the myBeforeInit function in different UniGUIComponents. for example:

    UniImage1, UniImage2 and UniImage3 uses the myBeforeInit function

  8. 7 minutes ago, Kurt said:

    Hi,

    how will i handle the database event of this? my scenario is:

    1. i have a column that is a sequence/series
    2. i want to reorder the sequence of the field


    example:

    seq, product_name
    1, PRODUCT A
    2, PRODUCT B
    3, PRODUCT C


    when i move the product B under the PRODUCT C i want the record to be:

    seq, product_name
    1, PRODUCT A
    2, PRODUCT C
    3, PRODUCT B

    any idea how to implement it?

    nevermind... i just checked the source code of sample. its already there... thanks.....

  9. Hi,

    how will i handle the database event of this? my scenario is:

    1. i have a column that is a sequence/series
    2. i want to reorder the sequence of the field


    example:

    seq, product_name
    1, PRODUCT A
    2, PRODUCT B
    3, PRODUCT C


    when i move the product B under the PRODUCT C i want the record to be:

    seq, product_name
    1, PRODUCT A
    2, PRODUCT C
    3, PRODUCT B

    any idea how to implement it?

×
×
  • Create New...