Fixed ScrollToCenter logic for EditItems
Use ScrollToCenter logic when text is changed or textbox is resized.
This commit is contained in:
@@ -217,18 +217,21 @@ namespace Volian.Controls.Library
|
||||
//// TIMING: DisplayItem.TimeIt("CSLARTB Top");
|
||||
InitializeComponent();// TODO: Performance 25%
|
||||
SetupEditItem(itemInfo, myStepPanel, myParentEditItem, myChildRelation, expand, null, false);
|
||||
MyStepRTB.TextChanged += new EventHandler(MyStepRTB_TextChanged);
|
||||
}
|
||||
public RTBItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand, EditItem nextEditItem)
|
||||
{
|
||||
//// TIMING: DisplayItem.TimeIt("CSLARTB Top");
|
||||
InitializeComponent();// TODO: Performance 25%
|
||||
SetupEditItem(itemInfo, myStepPanel, myParentEditItem, myChildRelation, expand, nextEditItem, false);
|
||||
MyStepRTB.TextChanged += new EventHandler(MyStepRTB_TextChanged);
|
||||
}
|
||||
public RTBItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand, bool addFirstChld)
|
||||
{
|
||||
//// TIMING: DisplayItem.TimeIt("CSLARTB Top");
|
||||
InitializeComponent();// TODO: Performance 25%
|
||||
SetupEditItem(itemInfo, myStepPanel, myParentEditItem, myChildRelation, expand, null, addFirstChld);
|
||||
MyStepRTB.TextChanged += new EventHandler(MyStepRTB_TextChanged);
|
||||
}
|
||||
//private void SetupRTBItem(ItemInfo itemInfo, StepPanel myStepPanel, EditItem myParentEditItem, ChildRelation myChildRelation, bool expand, EditItem nextEditItem)
|
||||
//{
|
||||
@@ -353,7 +356,14 @@ namespace Volian.Controls.Library
|
||||
void _MyStepRTB_Resize(object sender, EventArgs e)
|
||||
{
|
||||
if (MyStepPanel != null && this == MyStepPanel.SelectedEditItem)
|
||||
MyStepPanel.ScrollControlIntoView(this);
|
||||
ScrollToCenter();
|
||||
//MyStepPanel.ScrollControlIntoView(this);
|
||||
}
|
||||
void MyStepRTB_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (MyStepPanel != null && this == MyStepPanel.SelectedEditItem)
|
||||
ScrollToCenter();
|
||||
//MyStepPanel.ScrollControlIntoView(this);
|
||||
}
|
||||
private Label lblHeader = null;
|
||||
private Label lblFooter = null;
|
||||
|
Reference in New Issue
Block a user