Jump to content

Tokay

uniGUI Subscriber
  • Posts

    839
  • Joined

  • Last visited

  • Days Won

    19

Posts posted by Tokay

  1. 13 hours ago, picyka said:

    Is there a way to know if a given form is open?

    if UniMainModule.GetFormInstance(TUniFormVisualizarTarefa, false) then

    I tried this rule but it didn't work.

    I think it could possible do additional check:

    Form := UniMainModule.GetFormInstance(TUniFormVisualizarTarefa, False);

    if (not Assigned(Form)) and (not Form.Visible) then

     ..... form closed

  2. 31 minutes ago, andyhill said:

    Sherzod, this is really important for me, have I missed something ?

    Can you please show me how to use a single grid with two datasources (Master / Detail) using expanding / collapsing nodes.

    I think that you can post a screenshot what are you looking for.

  3. On 11/23/2022 at 9:54 AM, Sherzod said:

    Try this, just did it again.

    1. UniHiddenPanel1 -> UniMenuButton1

    2. Form OnReady ->

    procedure TMainForm.UniFormReady(Sender: TObject);
    begin
      with UniPageControl1.JSInterface do
      begin
        JSCall('tabPanel.tabBar.add', [JSObject('xtype: "tbfill"')]);
        JSCall('tabPanel.tabBar.add', [UniMenuButton1.JSControl]);
      end;
    end;

     

    Hi, this is great soultion for my purpose. It's do about ideal what's needed:

    image.png.207a09c0b952bfee3afbec8a3bb10e1d.png

    I put a label to the UniPageControl1. But how to center label vertically on the corner? And a bit push label to left from right border?

  4. Вот примерный код того что тебе нужно:

    procedure TMainForm.UniButton1Click(Sender: TObject);
    var
     lMainForm: TMainForm;
     lUniButton: TUniButton;
     MainModule: TUniMainModule;
     Session: TUniGUISession;
    begin
     Session := UniServerModule.GetSession('id второй сессии');
     if Assigned(Session) then
     begin
      MainModule := TUniMainModule(Session.UniApplication.UniMainModule);
      lMainForm := TMainForm(MainModule.GetFormInstance(TMainForm, False));
      lUniButton := TUniButton.Create(lMainForm);
      lUniButton.Parent := lMainForm;
     end;
    end;

    Единственное тебе нужно как-то найти ID сессии в которую надо пристроить кнопку.

×
×
  • Create New...