예제 #1
0
        public DescriptionControl()
        {
            ResizeRedraw = false;

            InitializeComponent();

            // Get the size of a vertical scroll bar.
            VScrollBar scrollBar = new VScrollBar();
            scrollWidth = scrollBar.GetPreferredSize(new Size(200,200)).Width;
            scrollBar.Dispose();
        }
예제 #2
0
        int vScrollbarWidth; // width of a default scroll bar.

        #endregion Fields

        #region Constructors

        public MainFrame()
        {
            Font = SystemFonts.MessageBoxFont;
            InitializeComponent();

            // Set height of tab strip appropriately.
            courseTabs.Height -= (courseTabs.DisplayRectangle.Height + 5);

            // Using the property designer for these doesn't totally work.
            veryLowIntensityMenu.Tag = 0.4;
            lowIntensityMenu.Tag = 0.55;
            mediumIntensityMenu.Tag = 0.7;
            highIntensityMenu.Tag = 0.85;
            fullIntensityMenu.Tag = 1.0;

            // Set the trackbar properties that can't be done in the designer.
            zoomTracker.TrackBar.TickStyle = TickStyle.None;
            zoomTracker.TrackBar.Minimum = 0;
            zoomTracker.TrackBar.Maximum = 100;

            // Get the size of a vertical scroll bar.
            VScrollBar scrollBar = new VScrollBar();
            vScrollbarWidth = scrollBar.GetPreferredSize(new Size(200, 200)).Width;
            scrollBar.Dispose();

            showToolTips = Settings.Default.ShowPopupInfo;

            SetMenuIcons();

            Application.Idle += new EventHandler(Application_Idle);
        }