rencarnacion Posted March 31, 2014 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; Quote
rencarnacion Posted April 8, 2014 Author 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 Quote
Administrators Farshad Mohajeri Posted April 8, 2014 Administrators Posted April 8, 2014 I can not help you unless; - You open a proper bug report - Attach a test case Thanks Quote
rencarnacion Posted April 8, 2014 Author 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 ? Quote
Administrators Farshad Mohajeri Posted April 8, 2014 Administrators Posted April 8, 2014 Please attach it here. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.