Jump to content


Photo

Menu's on Forms Goes wrong


  • Please log in to reply
6 replies to this topic

#1 WillemvanZyl

WillemvanZyl

    Newbie

  • uniGUI Subscriber
  • Pip
  • 8 posts

Posted 19 August 2017 - 09:52 AM

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?

Attached Files


  • 0

#2 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3430 posts

Posted 19 August 2017 - 10:21 AM

Hi,

Can you make a small testcase for this?
  • 0

#3 WillemvanZyl

WillemvanZyl

    Newbie

  • uniGUI Subscriber
  • Pip
  • 8 posts

Posted 19 August 2017 - 11:02 AM

Hi, Please see attached.

 

Initially it works fine going from form2 to form3. But one you close Form3 and view Form2 that Form3's menu is still active


  • 0

#4 WillemvanZyl

WillemvanZyl

    Newbie

  • uniGUI Subscriber
  • Pip
  • 8 posts

Posted 19 August 2017 - 11:03 AM

The Test app

Attached Files


  • 0

#5 Delphi Developer

Delphi Developer

    Advanced Member

  • Moderators
  • 3430 posts

Posted 23 August 2017 - 05:53 PM

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,


  • 0

#6 WillemvanZyl

WillemvanZyl

    Newbie

  • uniGUI Subscriber
  • Pip
  • 8 posts

Posted 23 August 2017 - 06:01 PM

Cool thanks, Will do :-)


  • 0

#7 daniel_paixao

daniel_paixao

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 29 August 2017 - 02:28 PM

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?"


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users