Jump to content

skafy

uniGUI Subscriber
  • Posts

    216
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by skafy

  1. Hi,

    I am having troubles when filling combobox (whitch serves as editor in dbgrid)... and when i filled it - with the use of remotequery timer the results seems to be empty. How is that possible?

    I've created test case.

    To recreate go to column city and doubleclick so editor is enabled then add one char or remove one. this fires remotequery event where combobox items are filled

     

    procedure TMainForm.UniComboBox1RemoteQuery(const QueryString: string;
      Result: TStrings);
    begin
      if Length(QueryString) > 0 then
      begin
        UniComboBox1.Items.Add('1');
        UniComboBox1.Items.Add('2');
        UniComboBox1.Items.Add('3');
        UniComboBox1.Items.Add('4');
    
        UniComboBox1.Expand;
      end;
    end;

    I also expand the combobox after filling. The combobox seems to be empty after all this.

    What am I doing wrong?

    GridEditors.zip

  2. 16 hours ago, picyka said:

    If I understand correctly,

    you need to view files from the server in the browser.

    I did something similar,

    but I did it with an api

    Sorry if I'm wrong.

    Yes I need to view files from shared folder.

    It seems like I cannot open new tab with folder view. Also found this..https://stackoverflow.com/questions/18246053/how-can-i-create-a-link-to-a-local-file-on-a-locally-run-web-page

    Quote

    You cannot cross from http(s) to the file protocol

    Modern versions of many browsers (e.g. Firefox and Chrome) will refuse to cross from the http(s) protocol to the file protocol to prevent malicious behaviour.

    This means a webpage hosted on a website somewhere will never be able to link to files on your hard drive. You'll need to open your webpage locally using the file protocol if you want to do this stuff at all.

    How did you did it with API?

  3. 43 minutes ago, Sherzod said:

    Hello,

    Your case is not very clear. 

    Where do you want to open, in a separate tab?

    Yes in a sepetate tab.

    Bellow code example also don't work.

    UniSession.AddJS('window.open(twAttachmentList.Selected.Text +'?fake='+dt+'")');    

     

  4. Hi,

    I wonder how is it possible (if it is) to show content of one x folder in browser. I tried to use label with <a href> with following lines

    • <a href="C:\FB6\">Link text</a>
    • <a href="file:///C:FB6/">Link text</a>

    It just starts processing and than "page crash" - timeout & refresh button shown

    In browser console it says - Prevented navigation to “c:\FB6\” due to an unknown protocol.

     

    How can this be done? If I enter file path manualy in new tab it works - like shown below.

    image.png.2d96e2006269a6e056bbe2a24627cf80.png

  5. 17 minutes ago, Sherzod said:
    procedure TMainForm.UniFormCreate(Sender: TObject);
    begin
      with UniTagField1 do
        if BorderStyle = ubsSolid then
          JSInterface.JSAddListener('afterrender', 'function(me){me.setStyle("border", "thin solid gray")}')
    
    end;

     

    This does not read the FieldWidth value.  Above command also bordered fieldcaption wich is not OK.

  6. Yes I already looked at this demo. Have you read initial post? I would like INVISIBLE button that acts (now if you disable buttony look, there is still dotty outline.). Or make all unigui component able to take dropped attachment

×
×
  • Create New...