rencarnacion Posted March 31, 2014 Share Posted March 31, 2014 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 More sharing options...
rencarnacion Posted April 8, 2014 Author Share Posted April 8, 2014 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 More sharing options...
Administrators Farshad Mohajeri Posted April 8, 2014 Administrators Share Posted April 8, 2014 I can not help you unless; - You open a proper bug report - Attach a test case Thanks Link to comment Share on other sites More sharing options...
rencarnacion Posted April 8, 2014 Author Share Posted April 8, 2014 Ok, I didn't think, It was a Bug. I thought that I was doing something wrong In the first Message I send a code Snippet with what I'm trying to Do Could I send you the Test Case to your Email ? Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted April 8, 2014 Administrators Share Posted April 8, 2014 Please attach it here. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now