Jump to content

I can't change the Visible Properties in MainMenu Item


rencarnacion
 Share

Recommended Posts

Hello I'm having problem trying to change de Visible property of MainMenu Item.

 

I had stored all the menu Item in table and I change these property in Create Form but It doesn't work .

 

 

 

If You see something Wrong Please Let me know 

 

 

 

Here the Code :

 

      for I := 0 to MainMenu.Items.Count -1 do
      begin
        with QryUuarioRoles, Parameters do
        begin
          Close ;
          ParamByName('Menu_Opcion').Value := MainMenu.Items.Name;
          ParamByName('ProfileID').Value := UniMainModule.Gv_Profile;
 
          Open;
          if eof then
             MainMenu.Items.Visible := False
          else
          MainMenu.Items.Visible := True;
        end;
 
              if  MainMenu.Items.Count  > 0 then
        begin
 
         for J := 0 to MainMenu.Items.Count -1 do
         begin
 
            with QryUuarioRoles, Parameters do
            begin
             Close ;
             ParamByName('Menu_Opcion').Value := MainMenu.Items.Name;
             ParamByName('ProfileID').Value := UniMainModule.Gv_Profile;
 
             Open;
             if eof then
                MainMenu.Items.Items[j].Visible := False
             else
                MainMenu.Items.Items[j].Visible := True;
             end;
 
           if MainMenu.Items.Items[j].Count >0  then
            begin
 
            for K := 0 to MainMenu.Items.Items[j].Count -1 do
            begin
 
            with QryUuarioRoles, Parameters do
            begin
             Close ;
             ParamByName('Menu_Opcion').Value := MainMenu.Items.Items[j].Items[K].Name;
             ParamByName('ProfileID').Value := UniMainModule.Gv_Profile;
             Open;
             if eof then
                MainMenu.Items.Items[j].Items[K].Visible := False
             else
                MainMenu.Items.Items[j].Items[K].Visible := True;
             end;
 
 
            end;
           end;
 
         end;
        end;
      end;
 

 

Link to comment
Share on other sites

Is there some way to change de Visible Property onCreate Event of the Main Form.  ?

I having problem changing the property because I Change de Visible property to false and the options  alway show how ever

Please I need to know If it is possible.

 

Farshad, I  Need your help 

 

 

Thanks 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...