Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) CellTime controlled from UI? (Read 4514 times)
bequer
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: May 17th, 2008
CellTime controlled from UI?
May 18th, 2008 at 4:17pm
Print Post  
Hi,

Is there a built in manner to control the celltime value from user interface. I enabled ShowNavigationButton but it does not show any button to change the CellTime value. How can I do this?

Thanks for any help,
Bequer
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: CellTime controlled from UI?
Reply #1 - May 19th, 2008 at 7:29am
Print Post  
What view are you using? The ShowNavigationButtons property only works in Timetable and List views.

Meppy
  
Back to top
 
IP Logged
 
bequer
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: May 17th, 2008
Re: CellTime controlled from UI?
Reply #2 - May 19th, 2008 at 1:22pm
Print Post  
Hi,

I use the TimeTableView, navigation buttons work fine but there are for dates only. My point is : how can I display buttons to allow the user to change the CellTime himself: 5 min, 10 min, 15 min, 30 min, 45 min and 60 min?

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


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: CellTime controlled from UI?
Reply #3 - May 19th, 2008 at 1:40pm
Print Post  
I am afraid there is no built-in feature that enables interactive modification of the cell duration. You have to add another control on the form, containing the Calendar control (for example a track bar), and use this control in order to manipulate the cell spans.

Meppy
  
Back to top
 
IP Logged
 
bequer
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: May 17th, 2008
Re: CellTime controlled from UI?
Reply #4 - May 19th, 2008 at 3:39pm
Print Post  
Ok,

I will add two little buttons similar to the navigation buttons in the calendar header. Is there a clean manner to do it I can send you back to become a standard feature?

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


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: CellTime controlled from UI?
Reply #5 - May 20th, 2008 at 6:10am
Print Post  
There is no clean way of doing this I can think of. Here is a code that can be used in order to add and position two buttons in the Calendar control. Unfortunately, this code relies on alot of speculations in order to calculate the actual position of the new buttons:

Code
Select All
foreach (Control c in calendar1.Controls)
{
	if (c.Visible && c is Button)
	{
		if ((c as Button).Image != null)
		{
			int width = c.Width;

			if (c.Left - width < 0)
			{
				// Its the right button
				Button b = new Button();
				b.Text = "<<";
				b.Size = c.Size;
				calendar1.Controls.Add(b);
				b.Location = new Point(c.Right, c.Top);
			}
			else
			{
				// Its the left button
				Button b = new Button();
				b.Text = ">>";
				b.Size = c.Size;
				b.Anchor = AnchorStyles.Right;
				calendar1.Controls.Add(b);
				b.Location = new Point(c.Left - width, c.Top);
			}
		}
	}
} 


Meppy
  
Back to top
 
IP Logged
 
bequer
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 7
Joined: May 17th, 2008
Re: CellTime controlled from UI?
Reply #6 - May 20th, 2008 at 2:12pm
Print Post  
I added two buttons in the left top corner of the timetableview with colors closed of the windows 2003 theme.

Thks
  
Back to top
 
IP Logged
 
harish_agr
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Mar 23rd, 2009
Re: CellTime controlled from UI?
Reply #7 - Mar 23rd, 2009 at 2:23pm
Print Post  
I want to resize the image associated with Appointment class. I have tried with ImageAlignment property to change the size of the image but not able to define the dynamic image size. Sad

I want to change my Image size based on Appointment object cell size.

Please help me.

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


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: CellTime controlled from UI?
Reply #8 - Mar 23rd, 2009 at 4:01pm
Print Post  
Can you please let me know which calendar view you are using?

Regards,
Meppy
  
Back to top
 
IP Logged
 
harish_agr
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 2
Joined: Mar 23rd, 2009
Re: CellTime controlled from UI?
Reply #9 - Mar 24th, 2009 at 4:20am
Print Post  
I am using Resource View and version is 4.5.x
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: CellTime controlled from UI?
Reply #10 - Mar 24th, 2009 at 7:22am
Print Post  
I have inspected the code and it seems that Style.ImageAlignment is only considered when the style is applied to a view cell rather than an item. The item image is always rendered in the left (top/left) corner of the item. However, you can create a custom item viewer in order to implement custom drawing logic for your items.

For more information on how to create custom item viewers, check Tutorial #5 in the Planner.NET documentation.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint