Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic intercepting the recurrence button (Read 2005 times)
elpuerco
Junior Member
**
Offline


Time?  What's time matta
to a pig?

Posts: 94
Joined: Oct 2nd, 2007
intercepting the recurrence button
Feb 6th, 2008 at 9:54am
Print Post  
On the appointment form is there a way to intercept the on click event of the recurrence button?

I need to be able to stop certain appointments from being set to a recurrence but at the same time allow the user access to the delete and save & close button on the appointment form.

I tried to find the identity of the recurrence button to set it to visible = false but could not locate it.

Thanks
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: intercepting the recurrence button
Reply #1 - Feb 6th, 2008 at 1:04pm
Print Post  
The following code displays an appointment form with disabled 'Recurrence' button:

Code
Select All
AppointmentForm f = new AppointmentForm(calendar1.Schedule);

foreach (Control c in f.Controls)
{
	if (c is ToolBar)
	{
		ToolBar t = c as ToolBar;
		t.Buttons[1].Enabled = false;
	}
}

f.ShowDialog(this); 


Meppy
  
Back to top
 
IP Logged
 
elpuerco
Junior Member
**
Offline


Time?  What's time matta
to a pig?

Posts: 94
Joined: Oct 2nd, 2007
Re: intercepting the recurrence button
Reply #2 - Feb 7th, 2008 at 6:34am
Print Post  
thanks meppy.

I had tried something similar before but missed out the index of the buttons!

Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint