C# Calendar Object on top

Asked by At

Hi programming some C# in a form with a bunch of group boxes. I have a two Calendar controls that when called upon, are partially invisible due to surrounding group boxes.

this.grp_TransactionDetails.Controls.Add(this.cal_Ctrl);
this.grp_TransactionDetails.Controls.Add(this.cal_Batch);

Any ideas? (I wish there was a z-index property)

2 Answers

0
contactmatt On Best Solutions

To fix this, I had to actually change the order in which the controls were added to the form. I changed the order in the Initialze() method of the form.

1
MusiGenesis On

Controls in .Net have a BringToFront() method that might be what you need. Calling this method on a control brings it to the front of the z-order (SendToBack() has the opposite effect, as you might expect).