Set the font to the parent font when adding first character to a cell of a table.
Added a DebugMethod to output all of the parent fonts for a control.
This commit is contained in:
parent
4d2b57b34a
commit
ea8014c8d2
@ -1360,6 +1360,18 @@ namespace Volian.Controls.Library
|
||||
LastRtf = string.Empty;
|
||||
FindAllLinks();
|
||||
}
|
||||
private void ShowMyParentsFonts()
|
||||
{
|
||||
Console.WriteLine("\r\n--- Parents Fonts ---- For ----{0}", Text);
|
||||
ShowMyParentsFonts(this);
|
||||
Console.WriteLine("Selection Font".PadRight(31) + SelectionFont);
|
||||
}
|
||||
private void ShowMyParentsFonts(Control ctrl)
|
||||
{
|
||||
if (ctrl.Parent is Control)
|
||||
ShowMyParentsFonts(ctrl.Parent);
|
||||
Console.WriteLine("{0} {1}", ctrl.GetType().Name.PadRight(30), ctrl.Font);
|
||||
}
|
||||
public void StepRTB_ContentsResized(object sender, ContentsResizedEventArgs e)
|
||||
{
|
||||
ContentsRectangle = e.NewRectangle;
|
||||
@ -2171,6 +2183,11 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (!ReadOnly)
|
||||
{
|
||||
if (Text == "" && Parent != null && Parent is VlnFlexGrid)
|
||||
{
|
||||
//ShowMyParentsFonts();
|
||||
SelectionFont = Parent.Font;
|
||||
}
|
||||
// add the character with its font depending on the char....
|
||||
if (!IsControlChar)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user