From 1fea9d4ef9d4fde06bddda3de24fb1fd44b63345 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 25 Nov 2009 17:10:37 +0000 Subject: [PATCH] fixed ribbon cut off problem --- PROMS/Volian.Controls.Library/DisplayTabControl.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/PROMS/Volian.Controls.Library/DisplayTabControl.cs b/PROMS/Volian.Controls.Library/DisplayTabControl.cs index f1ca0d13..ca06335a 100644 --- a/PROMS/Volian.Controls.Library/DisplayTabControl.cs +++ b/PROMS/Volian.Controls.Library/DisplayTabControl.cs @@ -514,6 +514,15 @@ namespace Volian.Controls.Library pg.Selected = true; SelectedDisplayTabItem = pg; pg.MyStepTabPanel.MyProcedureItemInfo = proc; + + // When more than one procedure is openned, the ribbon control cuts off the bottom of the buttons. + // This happened to all the procedure tabs after the first one. + // This is to kludge the logic into sizing the ribbon control properly. + // This is done by toggling "pg.MyStepTabPanel.MyStepTabRibbon.Expanded" + // Note that we are doing the NOT of its current setting. This takes care of when the + // ribbon bar is minimized and a new procedure tab is created + pg.MyStepTabPanel.MyStepTabRibbon.Expanded = !pg.MyStepTabPanel.MyStepTabRibbon.Expanded; + pg.MyStepTabPanel.MyStepTabRibbon.Expanded = !pg.MyStepTabPanel.MyStepTabRibbon.Expanded; } Application.DoEvents(); pg.SelectedItemInfo = myItemInfo; // Select the item