Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UserControl drawing / funciotn issues

Status
Not open for further replies.

Kalisto

Programmer
Feb 18, 2003
997
GB
I have a menu that is set up as a user control. The buttons on the control all work, so the code behind is being called.

Now for ease of use, I wish to change the enabled / disabled status of some of the buttons depending on who is logged on / off. But the code (placed in the control constructor function) is not executing (I have placed a breakpointon it and it is never called).

If I put the code on a page, and use it I can toggle a buttons enabled state, so I know that the code works, its just accessing it through the control.

So I assume that there is a method I need to add to my control that is called whenever it is drawn, as if I need to add in code in each page that uses the menu, then I lose the benefits of having a user control.

if it was C++ It would be something like the OnDraw() function, but that doesnt work in Vis Studio. Any advice / help greatfully received

K

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top