10887 : I want to change the alignment of the vertical scroll to the left…

Question

I want to change the alignment of the vertical scroll to the left… currently it is in between the grid and time item area…

Answer

gantt1.Grid.ScrollbarNodes.Parent=gantt1.TimeItemArea;
gantt1.Grid.ScrollbarNodes.Dock=

DockStyle.Right;

Mind you it is not fully supported. The grid does not really know what is going on, so when it displays the horizontal column scroller it will leave some space for the vertical scroller although it is not part of the grid any longer. This can ofcourse be compensated for, but it is not shown in this sample.

To elaborate on this further you can put the scrollbar outside the gantt like this:

      Panel aPanel=new Panel();
      aPanel.Parent=gantt1.Parent;
      aPanel.Top = gantt1.Top + gantt1.DateScalerHeight;
      aPanel.Left=gantt1.Right+1;
      aPanel.Height=gantt1.TimeItemArea.Height;
      aPanel.Width=gantt1.Grid.ScrollbarNodes.Width;

      gantt1.Grid.ScrollbarNodes.Parent = aPanel;
      gantt1.Grid.ScrollbarNodes.Dock=DockStyle.Fill;

Since this is not an un-common request we will add support for this into the Gantt so that this function is built in and fully supported.

One thought on “10887 : I want to change the alignment of the vertical scroll to the left…

  1. Concerning the given example. Is there a way to prevent the vertical ScrollBar Draw event in the Grid. The sample shows how to move the Grid ScrollBarNode to the TimeItemArea, but not how to make the Grid aware of that change.

    Can you elaborate about moving the vertical scroll a little bit more?

Leave a Reply