AdjustWidth() public method

public AdjustWidth ( ) : void
return void
コード例 #1
0
        /// <summary>
        /// the primary could as well be called "the one editable collection"... the one at the top
        /// </summary>
        private void LoadPrimaryCollectionButtons()
        {
            _primaryCollectionReloadPending = false;
            _primaryCollectionFlow.SuspendLayout();
            _primaryCollectionFlow.Controls.Clear();
            //without this guy, the FLowLayoutPanel uses the height of a button, on *the next row*, for the height of this row!
            var invisibleHackPartner = new Label()
            {
                Text = "", Width = 0
            };

            _primaryCollectionFlow.Controls.Add(invisibleHackPartner);
            var primaryCollectionHeader = new ListHeader()
            {
                ForeColor = Palette.TextAgainstDarkBackground
            };

            primaryCollectionHeader.Label.Text = _model.VernacularLibraryNamePhrase;
            primaryCollectionHeader.AdjustWidth();
            _primaryCollectionFlow.Controls.Add(primaryCollectionHeader);
            //_primaryCollectionFlow.SetFlowBreak(primaryCollectionHeader, true);
            _primaryCollectionFlow.Controls.Add(_menuTriangle);            //NB: we're using a picture box instead of a button because the former can have transparency.
            LoadOneCollection(_model.GetBookCollections().First(), _primaryCollectionFlow);
            _primaryCollectionFlow.ResumeLayout();
        }
コード例 #2
0
 /// <summary>
 /// the primary could as well be called "the one editable collection"... the one at the top
 /// </summary>
 private void LoadPrimaryCollectionButtons()
 {
     _primaryCollectionReloadPending = false;
     _primaryCollectionFlow.SuspendLayout();
     _primaryCollectionFlow.Controls.Clear();
     //without this guy, the FLowLayoutPanel uses the height of a button, on *the next row*, for the height of this row!
     var invisibleHackPartner = new Label() {Text = "", Width = 0};
     _primaryCollectionFlow.Controls.Add(invisibleHackPartner);
     var primaryCollectionHeader = new ListHeader() {ForeColor = Palette.TextAgainstDarkBackground};
     primaryCollectionHeader.Label.Text = _model.VernacularLibraryNamePhrase;
     primaryCollectionHeader.AdjustWidth();
     _primaryCollectionFlow.Controls.Add(primaryCollectionHeader);
     //_primaryCollectionFlow.SetFlowBreak(primaryCollectionHeader, true);
     _primaryCollectionFlow.Controls.Add(_menuTriangle);//NB: we're using a picture box instead of a button because the former can have transparency.
     LoadOneCollection(_model.GetBookCollections().First(), _primaryCollectionFlow);
     _primaryCollectionFlow.ResumeLayout();
 }