Jump to content

Menu's on Forms Goes wrong


WillemvanZyl

Recommended Posts

Hi,

 

I have 2 forms, one the client list form and the second the client Info Form. Each form has a menu that slides from the right hand side. When the client Info form is loaded and then closed, upon returning to the client List form I have the client Info Form's menu appearing when the menu is invoked. Any help with this?

post-5504-0-78790900-1503136325_thumb.jpg

post-5504-0-06008300-1503136337_thumb.jpg

post-5504-0-14965900-1503136347_thumb.jpg

Link to comment
Share on other sites

Hi,

 

Can you try this approach for now?!:

procedure TMainmForm.UnimMenu1Click(Sender: TUnimMenuItem);
begin
  case Sender.ButtonId of
    0: Begin
         UnimMenu1.Visible := False;
         frmForm2.Show(
           procedure (Sender: TComponent; AResult:Integer)
           begin
             UniSession.AddJS('Ext.Viewport.setMenu('+
               '' + UnimMenu1.JSName + ',' +
               '{  side: "right",'+
               '   reveal: true'+
               '});');
           end
         );
        End;
  end;
end;
procedure TfrmForm2.UnimMenu1Click(Sender: TUnimMenuItem);
begin
  case Sender.ButtonId of
    0: Begin
         UnimMenu1.Visible := False;
         frmForm3.Show(
           procedure (Sender: TComponent; AResult:Integer)
           begin
             UniSession.AddJS('Ext.Viewport.setMenu('+
               '' + UnimMenu1.JSName + ',' +
               '{  side: "right",'+
               '   reveal: true'+
               '});');
           end
         )
       End;
  end;
end;

Best regards,

Link to comment
Share on other sites

Hy! In uniGUI touch Demo have a Main Form "TMainmForm" that is a inherited from TUnimForm. This form have a TUniFrame in project time...who i can do it? Insert a TUniFrame into a form in project time? I'm tried to declare de variable  like "UniMainFrame: TUniMainFrame" but, a error is show me:

"Field MainmForm.uniMainFrame does not have a corresponding component. Remove the declaration?"

Link to comment
Share on other sites

  • 2 years later...
On 8/23/2017 at 8:53 PM, Sherzod said:

Hi,

 

Can you try this approach for now?!:


procedure TMainmForm.UnimMenu1Click(Sender: TUnimMenuItem);
begin
  case Sender.ButtonId of
    0: Begin
         UnimMenu1.Visible := False;
         frmForm2.Show(
           procedure (Sender: TComponent; AResult:Integer)
           begin
             UniSession.AddJS('Ext.Viewport.setMenu('+
               '' + UnimMenu1.JSName + ',' +
               '{  side: "right",'+
               '   reveal: true'+
               '});');
           end
         );
        End;
  end;
end;

procedure TfrmForm2.UnimMenu1Click(Sender: TUnimMenuItem);
begin
  case Sender.ButtonId of
    0: Begin
         UnimMenu1.Visible := False;
         frmForm3.Show(
           procedure (Sender: TComponent; AResult:Integer)
           begin
             UniSession.AddJS('Ext.Viewport.setMenu('+
               '' + UnimMenu1.JSName + ',' +
               '{  side: "right",'+
               '   reveal: true'+
               '});');
           end
         )
       End;
  end;
end;

Best regards,

Doesn't work. Menu showing, but it's empty

Link to comment
Share on other sites

  • 8 months later...
  • 5 months later...
×
×
  • Create New...