Windows form label bold


















GetPreferredSize Size. Retrieves the size of a rectangular area into which a control can be fitted. Retrieves the bounds within which the control is scaled. GetService Type. GetStyle ControlStyles. Retrieves the value of the specified control style bit for the control. Determines if the control is a top-level control.

Conceals the control from the user. Obtains a lifetime service object to control the lifetime policy for this instance. Called after the control has been added to another container. Invalidates the entire surface of the control and causes the control to be redrawn. Invalidate Boolean. Invalidate Rectangle. Invalidate Rectangle, Boolean.

Invalidate Region. Invalidate Region, Boolean. Invoke Action. Executes the specified delegate on the thread that owns the control's underlying window handle. Invoke Delegate. Invoke Delegate, Object[]. IsInputChar Char. Determines if a character is an input character that the control recognizes.

IsInputKey Keys. LogicalToDeviceUnits Int LogicalToDeviceUnits Size. MemberwiseClone Boolean. NotifyInvalidate Rectangle. OnClick EventArgs. OnCursorChanged EventArgs. OnDockChanged EventArgs. OnDoubleClick EventArgs. OnDragLeave EventArgs. OnEnabledChanged EventArgs. OnEnter EventArgs. OnFontChanged EventArgs. OnGotFocus EventArgs. OnHandleCreated EventArgs. OnHandleDestroyed EventArgs. OnInvalidated InvalidateEventArgs.

OnLayout LayoutEventArgs. OnLeave EventArgs. OnLocationChanged EventArgs. OnLostFocus EventArgs. OnMarginChanged EventArgs. OnMouseEnter EventArgs. OnMouseHover EventArgs. OnMouseLeave EventArgs. OnMove EventArgs. OnNotifyMessage Message. Notifies the control of Windows messages.

OnPaddingChanged EventArgs. OnPaint PaintEventArgs. Paints the background of the control. OnParentChanged EventArgs. OnPrint PaintEventArgs. OnRegionChanged EventArgs. OnResize EventArgs. OnSizeChanged EventArgs. OnStyleChanged EventArgs. OnTextChanged EventArgs. OnValidated EventArgs.

OnValidating CancelEventArgs. OnVisibleChanged EventArgs. Forces the control to apply layout logic to all its child controls. PerformLayout Control, String. PointToClient Point. Computes the location of the specified screen point into client coordinates. PointToScreen Point. Computes the location of the specified client point into screen coordinates. PreProcessControlMessage Message. Preprocesses keyboard or input messages within the message loop before they are dispatched.

PreProcessMessage Message. ProcessCmdKey Message, Keys. Processes a command key. ProcessDialogChar Char. Processes a dialog character. ProcessDialogKey Keys. Processes a dialog key. ProcessKeyEventArgs Message. Processes a key message and generates the appropriate control events.

ProcessKeyMessage Message. Processes a keyboard message. ProcessKeyPreview Message. Previews a keyboard message. ProcessMnemonic Char. Raises the appropriate drag event. Raises the appropriate key event.

Raises the appropriate mouse event. Raises the appropriate paint event. Forces the re-creation of the handle for the control.

RectangleToClient Rectangle. Computes the size and location of the specified screen rectangle in client coordinates. RectangleToScreen Rectangle.

Computes the size and location of the specified client rectangle in screen coordinates. Provides constants for rescaling the control when a DPI change occurs. Resumes usual layout logic. ResumeLayout Boolean. Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests. RtlTranslateAlignment ContentAlignment.

RtlTranslateAlignment HorizontalAlignment. RtlTranslateContent ContentAlignment. RtlTranslateHorizontal HorizontalAlignment. Scale Single. Scales the control and any child controls.

Scale Single, Single. Scales the entire control and any child controls. Scale SizeF. Scales the control and all child controls by the specified scaling factor. Scales a logical bitmap value to it's equivalent device unit value when a DPI change occurs. Scales a control's location, size, padding and margin. ScaleCore Single, Single. This method is not relevant for this class. Activates the control. Select Boolean, Boolean. Activates the next control.

Sends the control to the back of the z-order. Sets the bounds of the control to the specified location and size. Sets the specified bounds of the control to the specified location and size. Sets the size of the client area of the control. SetStyle ControlStyles, Boolean. SetTopLevel Boolean. Sets the control as the top-level control.

SetVisibleCore Boolean. Sets the control to the specified visible state. Displays the control to the user. SizeFromClientSize Size. Determines the size of the entire control from the height and width of its client area.

Temporarily suspends the layout logic for the control. Causes the control to redraw the invalidated regions within its client area.

Updates the bounds of the control with the current size and location. Updates the bounds of the control with the specified size and location. Updates the bounds of the control with the specified size, location, and client size. Forces the assigned styles to be reapplied to the control. Updates the control in its parent's z-order. WndProc Message. Occurs when the focus or keyboard user interface UI cues change. Occurs when the control is clicked.

Occurs when the control is double-clicked. Occurs when a drag-and-drop operation is completed. Occurs when an object is dragged into the control's bounds. Occurs when an object is dragged out of the control's bounds. Occurs when an object is dragged over the control's bounds. Occurs when the control is entered. Occurs during a drag operation. Occurs when the control receives focus.

Occurs when a handle is created for the control. Occurs when the control's handle is in the process of being destroyed. Occurs when the user requests help for a control. Occurs when a control's display requires redrawing. Occurs when a control should reposition its child controls. Occurs when the input focus leaves the control. Occurs when the control loses focus. Occurs when the control's margin changes. Occurs when the control loses mouse capture. Occurs when the control is clicked by the mouse.

Occurs when the control is double clicked by the mouse. Occurs when the mouse pointer is over the control and a mouse button is pressed. Occurs when the mouse pointer enters the control. Occurs when the mouse pointer rests on the control. Occurs when the mouse pointer leaves the control.

Occurs when the mouse pointer is moved over the control. Occurs when the mouse pointer is over the control and a mouse button is released. Occurs when the mouse wheel moves while the control has focus. Occurs when the control is moved. Occurs when the control's padding changes.

Occurs when the control is redrawn. Chances are they have and don't get it. Provide an answer or move on to the next question. Let's work to help developers, not make them feel stupid. Related Questions. Change Label Text to bold on certain events.

How to make some part of text block's text as bold? Label's bold property is turning off at runtime. Unable to update label in GUI. Randomly shuffle the label text. Make some part of a string large and bold. Layout: fixed fluid. Web02 2. Strip HTML. Encode HTML. Paste as-is. Code block. Quoted Text. On 6 Aug. As far as I know it is not possible to use different fonts for different parts of the same label, since it doesn't support anything like RTF markups or the like. So either you use two labels one for the bold part, one for the other or you derive your own label class from label and handle the drawing yourself.

DrawString this. Substring 0,9 , new System. Font "Tahoma", 8. Bold, System. Point, byte 0 , new SolidBrush this. ForeColor , new Rectangle this. Left, this. Top, this. Width - this. Height , StringFormat. Width, Int MeasureText this. Substring 0, 9 , this. Font, sz, TextFormatFlags. WordBreak ; e. Substring 10 , new System. Regular, System.

ForeColor , this. Width, this. Top ;. I'm rereading the thread it didn't seem to me that you wanted part of the text bold from the original post and if you don't want two separate labels, then you will have to create a custom control and paint the label yourself.



0コメント

  • 1000 / 1000