fixed the problem where the last item in the step list was not scrolling all the way into view

logic to change background color if the item contains an annotation
This commit is contained in:
John Jenko 2010-01-11 14:05:31 +00:00
parent bf8a0560e7
commit cfb58493fa
5 changed files with 72 additions and 4 deletions

View File

@ -82,11 +82,20 @@ namespace Volian.Controls.Library
this.groupPanelBtns.Style.BorderRightWidth = 1; this.groupPanelBtns.Style.BorderRightWidth = 1;
this.groupPanelBtns.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; this.groupPanelBtns.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelBtns.Style.BorderTopWidth = 1; this.groupPanelBtns.Style.BorderTopWidth = 1;
this.groupPanelBtns.Style.Class = "";
this.groupPanelBtns.Style.CornerDiameter = 4; this.groupPanelBtns.Style.CornerDiameter = 4;
this.groupPanelBtns.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.groupPanelBtns.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelBtns.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; this.groupPanelBtns.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.groupPanelBtns.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; this.groupPanelBtns.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.groupPanelBtns.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; this.groupPanelBtns.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.groupPanelBtns.StyleMouseDown.Class = "";
//
//
//
this.groupPanelBtns.StyleMouseOver.Class = "";
this.groupPanelBtns.TabIndex = 25; this.groupPanelBtns.TabIndex = 25;
// //
// btnTranCancel // btnTranCancel
@ -146,11 +155,20 @@ namespace Volian.Controls.Library
this.groupPanelTranFmt.Style.BorderRightWidth = 1; this.groupPanelTranFmt.Style.BorderRightWidth = 1;
this.groupPanelTranFmt.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; this.groupPanelTranFmt.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelTranFmt.Style.BorderTopWidth = 1; this.groupPanelTranFmt.Style.BorderTopWidth = 1;
this.groupPanelTranFmt.Style.Class = "";
this.groupPanelTranFmt.Style.CornerDiameter = 4; this.groupPanelTranFmt.Style.CornerDiameter = 4;
this.groupPanelTranFmt.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.groupPanelTranFmt.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelTranFmt.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; this.groupPanelTranFmt.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.groupPanelTranFmt.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; this.groupPanelTranFmt.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.groupPanelTranFmt.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; this.groupPanelTranFmt.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.groupPanelTranFmt.StyleMouseDown.Class = "";
//
//
//
this.groupPanelTranFmt.StyleMouseOver.Class = "";
this.groupPanelTranFmt.TabIndex = 27; this.groupPanelTranFmt.TabIndex = 27;
this.groupPanelTranFmt.Text = "Select Format"; this.groupPanelTranFmt.Text = "Select Format";
// //
@ -193,11 +211,20 @@ namespace Volian.Controls.Library
this.groupPanelTransitionSets.Style.BorderRightWidth = 1; this.groupPanelTransitionSets.Style.BorderRightWidth = 1;
this.groupPanelTransitionSets.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; this.groupPanelTransitionSets.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelTransitionSets.Style.BorderTopWidth = 1; this.groupPanelTransitionSets.Style.BorderTopWidth = 1;
this.groupPanelTransitionSets.Style.Class = "";
this.groupPanelTransitionSets.Style.CornerDiameter = 4; this.groupPanelTransitionSets.Style.CornerDiameter = 4;
this.groupPanelTransitionSets.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.groupPanelTransitionSets.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelTransitionSets.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; this.groupPanelTransitionSets.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.groupPanelTransitionSets.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; this.groupPanelTransitionSets.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.groupPanelTransitionSets.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; this.groupPanelTransitionSets.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.groupPanelTransitionSets.StyleMouseDown.Class = "";
//
//
//
this.groupPanelTransitionSets.StyleMouseOver.Class = "";
this.groupPanelTransitionSets.TabIndex = 31; this.groupPanelTransitionSets.TabIndex = 31;
this.groupPanelTransitionSets.Text = "Select Procedure Set"; this.groupPanelTransitionSets.Text = "Select Procedure Set";
// //
@ -238,11 +265,20 @@ namespace Volian.Controls.Library
this.groupPanelTransitionProcs.Style.BorderRightWidth = 1; this.groupPanelTransitionProcs.Style.BorderRightWidth = 1;
this.groupPanelTransitionProcs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; this.groupPanelTransitionProcs.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelTransitionProcs.Style.BorderTopWidth = 1; this.groupPanelTransitionProcs.Style.BorderTopWidth = 1;
this.groupPanelTransitionProcs.Style.Class = "";
this.groupPanelTransitionProcs.Style.CornerDiameter = 4; this.groupPanelTransitionProcs.Style.CornerDiameter = 4;
this.groupPanelTransitionProcs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.groupPanelTransitionProcs.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelTransitionProcs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; this.groupPanelTransitionProcs.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.groupPanelTransitionProcs.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; this.groupPanelTransitionProcs.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.groupPanelTransitionProcs.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; this.groupPanelTransitionProcs.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.groupPanelTransitionProcs.StyleMouseDown.Class = "";
//
//
//
this.groupPanelTransitionProcs.StyleMouseOver.Class = "";
this.groupPanelTransitionProcs.TabIndex = 32; this.groupPanelTransitionProcs.TabIndex = 32;
this.groupPanelTransitionProcs.Text = "Select Procedure"; this.groupPanelTransitionProcs.Text = "Select Procedure";
// //
@ -283,11 +319,20 @@ namespace Volian.Controls.Library
this.groupPanelTransitionSect.Style.BorderRightWidth = 1; this.groupPanelTransitionSect.Style.BorderRightWidth = 1;
this.groupPanelTransitionSect.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; this.groupPanelTransitionSect.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelTransitionSect.Style.BorderTopWidth = 1; this.groupPanelTransitionSect.Style.BorderTopWidth = 1;
this.groupPanelTransitionSect.Style.Class = "";
this.groupPanelTransitionSect.Style.CornerDiameter = 4; this.groupPanelTransitionSect.Style.CornerDiameter = 4;
this.groupPanelTransitionSect.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.groupPanelTransitionSect.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelTransitionSect.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; this.groupPanelTransitionSect.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.groupPanelTransitionSect.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; this.groupPanelTransitionSect.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.groupPanelTransitionSect.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; this.groupPanelTransitionSect.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.groupPanelTransitionSect.StyleMouseDown.Class = "";
//
//
//
this.groupPanelTransitionSect.StyleMouseOver.Class = "";
this.groupPanelTransitionSect.TabIndex = 33; this.groupPanelTransitionSect.TabIndex = 33;
this.groupPanelTransitionSect.Text = "Select Section"; this.groupPanelTransitionSect.Text = "Select Section";
// //
@ -330,11 +375,20 @@ namespace Volian.Controls.Library
this.groupPanelTranstionSteps.Style.BorderRightWidth = 1; this.groupPanelTranstionSteps.Style.BorderRightWidth = 1;
this.groupPanelTranstionSteps.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid; this.groupPanelTranstionSteps.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.groupPanelTranstionSteps.Style.BorderTopWidth = 1; this.groupPanelTranstionSteps.Style.BorderTopWidth = 1;
this.groupPanelTranstionSteps.Style.Class = "";
this.groupPanelTranstionSteps.Style.CornerDiameter = 4; this.groupPanelTranstionSteps.Style.CornerDiameter = 4;
this.groupPanelTranstionSteps.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded; this.groupPanelTranstionSteps.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
this.groupPanelTranstionSteps.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center; this.groupPanelTranstionSteps.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
this.groupPanelTranstionSteps.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText; this.groupPanelTranstionSteps.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.groupPanelTranstionSteps.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near; this.groupPanelTranstionSteps.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
//
//
//
this.groupPanelTranstionSteps.StyleMouseDown.Class = "";
//
//
//
this.groupPanelTranstionSteps.StyleMouseOver.Class = "";
this.groupPanelTranstionSteps.TabIndex = 34; this.groupPanelTranstionSteps.TabIndex = 34;
this.groupPanelTranstionSteps.Text = "Select Step"; this.groupPanelTranstionSteps.Text = "Select Step";
// //
@ -364,6 +418,10 @@ namespace Volian.Controls.Library
// //
// lblxTranRangeTip // lblxTranRangeTip
// //
//
//
//
this.lblxTranRangeTip.BackgroundStyle.Class = "";
this.lblxTranRangeTip.Dock = System.Windows.Forms.DockStyle.Right; this.lblxTranRangeTip.Dock = System.Windows.Forms.DockStyle.Right;
this.lblxTranRangeTip.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.lblxTranRangeTip.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblxTranRangeTip.Location = new System.Drawing.Point(355, 0); this.lblxTranRangeTip.Location = new System.Drawing.Point(355, 0);

View File

@ -423,6 +423,9 @@ namespace Volian.Controls.Library
startitm = (startitm.NextItemCount > 0 ? startitm.NextItems[0] : null); startitm = (startitm.NextItemCount > 0 ? startitm.NextItems[0] : null);
} }
tvTran.BeforeExpand += new TreeViewCancelEventHandler(tvTran_BeforeExpand); tvTran.BeforeExpand += new TreeViewCancelEventHandler(tvTran_BeforeExpand);
// bug fix. TreeView needs the next two lines to properly display the bottom node. jsj 01/08/2010
tvTran.ItemHeight++;
tvTran.ItemHeight--;
} }
private void cbTranSectsFillIn(ItemInfo secitm, int secstart) private void cbTranSectsFillIn(ItemInfo secitm, int secstart)
{ {

View File

@ -745,7 +745,7 @@ namespace Volian.Controls.Library
_MyStepRTB.MyStepItem = this; _MyStepRTB.MyStepItem = this;
//// TIMING: DisplayItem.TimeIt("CSLARTB InitComp"); //// TIMING: DisplayItem.TimeIt("CSLARTB InitComp");
BackColor = myStepPanel.PanelColor; BackColor = myStepPanel.PanelColor;
_MyStepRTB.BackColor = myStepPanel.InactiveColor; //_MyStepRTB.BackColor = myStepPanel.InactiveColor;
// TODO: Adjust top based upon format // TODO: Adjust top based upon format
// TODO: Remove Label and just output ident on the paint event // TODO: Remove Label and just output ident on the paint event
lblTab.Left = 20; lblTab.Left = 20;
@ -1335,7 +1335,8 @@ namespace Volian.Controls.Library
/// <param name="e"></param> /// <param name="e"></param>
void StepItem_BackColorChanged(object sender, EventArgs e) void StepItem_BackColorChanged(object sender, EventArgs e)
{ {
_MyStepRTB.BackColor = BackColor; //_MyStepRTB.BackColor = BackColor;
_MyStepRTB.SetBackColor();
} }
/// <summary> /// <summary>
/// When the RichTextBox height changes, change the height of the control to match /// When the RichTextBox height changes, change the height of the control to match

View File

@ -334,7 +334,8 @@ namespace Volian.Controls.Library
if (_SelectedStepRTB == value) return; // Same - No Change if (_SelectedStepRTB == value) return; // Same - No Change
if (_SelectedStepRTB != null) if (_SelectedStepRTB != null)
{ {
_SelectedStepRTB.BackColor = InactiveColor; //_SelectedStepRTB.BackColor = InactiveColor;
_SelectedStepRTB.SetBackColor();
_SelectedStepRTB.SaveText(); // Save any changes to the text _SelectedStepRTB.SaveText(); // Save any changes to the text
_SelectedStepRTB.SaveConfig(); // This may be redundant _SelectedStepRTB.SaveConfig(); // This may be redundant
_SelectedStepRTB.RTBFillIn(false); _SelectedStepRTB.RTBFillIn(false);

View File

@ -163,10 +163,15 @@ namespace Volian.Controls.Library
if (value != null) if (value != null)
{ {
RTBFillIn(!ViewRTB); RTBFillIn(!ViewRTB);
SetBackColor();
//ViewRTB = MyStepItem.MyStepPanel.PanelViewEditMode == E_ViewMode.View; //ViewRTB = MyStepItem.MyStepPanel.PanelViewEditMode == E_ViewMode.View;
} }
} }
} }
public void SetBackColor()
{
BackColor = _MyItemInfo.ItemAnnotationCount == 0 ? MyStepItem.MyStepPanel.InactiveColor : Color.FromArgb(255, 255, 128);
}
private string _origRTF; private string _origRTF;
public void RTBFillIn(bool edit) public void RTBFillIn(bool edit)
{ {
@ -1801,7 +1806,7 @@ namespace Volian.Controls.Library
private RichTextBoxFinds _FindOptions = RichTextBoxFinds.None; private RichTextBoxFinds _FindOptions = RichTextBoxFinds.None;
public void FindText(string str, bool caseSensitive, bool matchWholeWord, bool reverse) public void FindText(string str, bool caseSensitive, bool matchWholeWord, bool reverse)
{ {
RTF savRTF = new RTF(); StepRTB savRTF = new RTF();
int startpos = SelectionStart + SelectionLength; int startpos = SelectionStart + SelectionLength;
savRTF.Text = this.Text; savRTF.Text = this.Text;