|
//
// Text2Mambo - convert HTML to mambo CMS
// Copyright (C) 2009-2011 John Janssen
// http://www.travelisfun.org
//
// This program is free software; you can redistribute it and/or modify
// it any way you want as long as the above copyright statement is maintained.
//
// This program is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
using System;
using System.Collections.Generic;
using System.Security;
using System.Text;
using System.Windows.Forms;
namespace TIFTools
{
public class MyUserControl : UserControl
{
virtual public void Closing() { }
virtual public void Loading() { }
private void InitializeComponent()
{
//this.SuspendLayout();
//this.Name = "MyUserControl";
//this.ResumeLayout(false);
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ResizeToParent()
{
// resize the control to fill the whole tabcontrols client area.
if (Parent is TabPage)
{
TabPage tp = (TabPage)Parent;
TabControl tc = (TabControl)tp.Parent;
// The -8 and -26 are en empirical measurements to compansate for tabpage borders
// They can probably be calculated but that's not needed here.
this.Size = new System.Drawing.Size(tc.ClientSize.Width - 8, tc.ClientSize.Height - 26);
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Started in 1988 programming in Pascal, making a 68000 emulator on a DOS platform. Then from Pascal to Clipper, to C++ and now using C#. I've been programming for all walks of businesses; opticians, opthomologist, carbage collectors, reinforcement steel producers, retail chains, and more.
I'm now travelling through Africa with a home-build expedition truck.