gtk-sharp0.0.0.0Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details.A widget that displays a small to medium amount of text
This widget displays a small to medium amount of text, it is
the widget used by other widgets, such as and for
displaying text.
Labels may contain mnemonics; mnemonics are underlined
characters in the label, used for keyboard navigation. To
provide the mnemonic, put an underscore before the mnemonic
character, such as "_File".
Gtk.MiscAtk.ImplementorGLib.IWrapperGLib.IWrapperSystem.IDisposableMethodGtk.LabelCreates a new label widget, containing the text in
.
The text of the label, with an optional underscore to mark the mnemonic character
a new widget
If characters in str are preceded by an underscore, they
are underlined. If you need a literal underscore character
in a label, use '__' (two underscores). The first
underlined character represents a keyboard accelerator
called a mnemonic. The mnemonic key can be used to
activate another widget, chosen automatically, or
explicitly using .
If is not set, then the
first activatable ancestor of the will be chosen
as the mnemonic widget. For instance, if the label is
inside a button or menu item, the button or menu item will
automatically become the mnemonic widget and be activated
by the mnemonic.
MethodSystem.BooleanGets the selected range of characters in the label.
return location for start of selection, as a character offset
return location for end of selection, as a character offset
returns if there's a selection.MethodSystem.VoidSelects a range of characters in the label, if the label is selectable.
start offset (in characters not bytes)
end offset (in characters not bytes)
Selects a range of characters in the label, if the label
is selectable. See . If the
label is not selectable, this function has no effect. If
or
are -1, then the end of the
label will be substituted.
MethodSystem.Void
Obtains the coordinates where the label will draw the
representing the text in the label
location to store X offset of layout, or
location to store Y offset of layout, or
Obtains the coordinates where the label will draw the
representing the text in the label; useful to
convert mouse events into coordinates inside the
, e.g. to take some action if some part of the
label is clicked. Of course you will need to create a
to receive the events, and pack the label
inside it, since labels are a
widget. Remember when using the
functions you
need to convert to and from pixels using PANGO_PIXELS() or
PANGO_SCALE.
MethodSystem.VoidDisposes the resources associated with the object.ConstructorInternal constructor
Pointer to the C object.
An instance of Label, wrapping the C object.This is an internal constructor, and should not be used by user code.Constructor
Creates a new label with the given text inside it. You can
pass to get an empty label
widget.
The text of the label
the new label widget
Creates a new label with the given text inside it. You can
pass to get an empty label
widget.
ConstructorConstructor used to extending this classthe newly created PropertySystem.UInt32The GLib Type for Gtk.LabelThe GLib Type for the Gtk.Label class.PropertySystem.StringSets the label's text
the text for this label
Sets the label's text. If characters in
are preceded by an underscore, they are
underlined indicating that they represent a keyboard
accelerator called a mnemonic. The mnemonic key can be
used to activate another widget, chosen automatically, or
explicitly using .
PropertySystem.StringParses str which is marked up with the Pango text markup language
a markup string (see Pango markup format)
a GtkLabel
Parses which is marked up with the
Pango text markup language, setting the label's text and
attribute list based on the parse results.
PropertySystem.BooleanToggles line wrapping within the GtkLabel widget. makes it
break lines if text exceeds the widget's size. lets the text get cut off by the edge of the widget if it exceeds the widget size.
if the lines of the label are automatically wrapped.PropertySystem.StringThe text within the GtkLabel widget.
The text you want to set.
a GtkLabel
When setting the text within the GtkLabel widget, it overwrites any text that was there before.
PropertyPango.LayoutGets the used to display the label. the for this label
Gets the used to display the label. The layout
is useful to e.g. convert text positions to pixel
positions, in combination with . The returned layout
is owned by the label so need not be freed by the caller.
PropertySystem.String
Parses which is marked up with the
Pango text markup language, setting the label's text and
attribute list based on the parse results.
a markup string (see Pango markup format)
a new label widget
Parses which is marked up with the
Pango text markup language, setting the label's text and
attribute list based on the parse results. If characters
in str are preceded by an underscore, they are underlined
indicating that they represent a keyboard accelerator
called a mnemonic.
The mnemonic key can be used to activate another widget,
chosen automatically, or explicitly using .
PropertySystem.BooleanToggle whether or not the label allow the user to select text from the label, for copy-and-paste. to allow selecting text in the
label, and to disallow.
if the label is selectable, and
if not.
PropertyGtk.JustificationThe alignment of the lines in the text of the label relative to each other
a The justification of the label
Sets the alignment of the lines in the text of the label
relative to each other. is the default value
when the widget is first created with . If you instead want to set the
alignment of the label as a whole, set instead. This has no effect
on labels containing only a single line.
PropertySystem.Int32The current position of the insertion cursor in characters.The current position of the insertion cursor in charactersPropertySystem.Int32The position of the opposite end of the selection from the cursor in characters.The position of the opposite end of the selection from the cursor in characters.PropertyGtk.WidgetThe widget to be activated when the label's mnemonic key is pressed.
The widget to be activated when the label's mnemonic key is pressed.
The widget to be activated when the label's mnemonic key is pressed.PropertySystem.StringThee text from a label widget including any embedded underlines indicating mnemonics and Pango markup.
The text of the label widget
The text of the label widget.PropertySystem.StringA string with _ characters in positions correspond to characters in the text to underline.
A string with _ characters in positions correspond to characters in the text to underline.
PropertySystem.UInt32The mnemonic accelerator key for this label.The mnemonic accelerator key for this label.PropertySystem.BooleanWhether lines should be wrapped if the text becomes too wide. to wrap lines
whether lines should be wrappedPropertySystem.Boolean
Whether an underline in the text indicates the next
character should be used for the mnemonic accelerator key.
to use underline
Whether an underline in the text indicates the next
character should be used for the mnemonic accelerator key.
PropertySystem.BooleanWhether the label's text is interpreted as marked up with the Pango text markup language. to parse the
text as Pango markup, as plain-text
PropertyPango.AttrListThe attribute list set on the label.
a the attribute list set on the label
This function does not reflect attributes that come from
the labels markup (see ). If you
want to get the effective attributes for the label, use
on the label's
property.
EventGtkSharp.MoveCursorHandlerEmitted when the cursor is moved.EventGtkSharp.PopulatePopupHandlerEmitted when a right-click pop-up menu is displayedEventSystem.EventHandlerEmitted when text is copied to the clipboard.ConstructorInternal constructor
GLib type for the type
Creates a new instance of Label, using the GLib-provided typeThis is a constructor used by derivative types of that would have their own GLib type assigned to it. This is not typically used by C# code.