SIL.FieldWorks.LexText.Controls.MSAGroupBox.AdjustInternalControlsAndGrow C# (CSharp) Method

AdjustInternalControlsAndGrow() public method

public AdjustInternalControlsAndGrow ( ) : void
return void
		public void AdjustInternalControlsAndGrow()
		{
			int nHeightWanted = m_fwcbAffixTypes.PreferredHeight;
			int delta = nHeightWanted - m_fwcbAffixTypes.Height;
			if (delta > 0)
			{
				this.Height += delta;
				m_fwcbAffixTypes.Height = nHeightWanted;
				FontHeightAdjuster.GrowDialogAndAdjustControls(m_groupBox, delta, m_fwcbAffixTypes);
			}
			nHeightWanted = m_tcMainPOS.PreferredHeight;
			delta = nHeightWanted - m_tcMainPOS.Height;
			if (delta > 0)
			{
				m_tcMainPOS.Height = nHeightWanted;
				this.Height += delta;
				FontHeightAdjuster.GrowDialogAndAdjustControls(m_groupBox, delta, m_tcMainPOS);
			}
			int nWanted1 = m_fwcbSlots.PreferredHeight;
			int delta1 = nWanted1 - m_fwcbSlots.Height;
			int nWanted2 = m_tcSecondaryPOS.PreferredHeight;
			int delta2 = nWanted2 - m_tcSecondaryPOS.Height;
			delta = Math.Max(delta1, delta2);
			if (delta > 0)
			{
				if (delta1 > 0)
					m_fwcbSlots.Height = nWanted1;
				if (delta2 > 0)
					m_tcSecondaryPOS.Height = nWanted2;
				this.Height += delta;
				if (delta1 == delta)
					FontHeightAdjuster.GrowDialogAndAdjustControls(m_groupBox, delta, m_fwcbSlots);
				else
					FontHeightAdjuster.GrowDialogAndAdjustControls(m_groupBox, delta, m_tcSecondaryPOS);
			}
		}
		#endregion Other methods

Usage Example

Ejemplo n.º 1
0
        private void AdjustHeightAndPositions(MSAGroupBox msagb)
        {
            int oldHeight = msagb.Height;
            int newHeight = Math.Max(oldHeight, msagb.PreferredHeight);
            int delta     = newHeight - oldHeight;

            if (delta > 0)
            {
                msagb.AdjustInternalControlsAndGrow();
                Debug.Assert(msagb.Height == msagb.PreferredHeight);
                FontHeightAdjuster.GrowDialogAndAdjustControls(this, delta, msagb);
            }
        }
All Usage Examples Of SIL.FieldWorks.LexText.Controls.MSAGroupBox::AdjustInternalControlsAndGrow