gtk-sharpGtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details.Gtk.MiscA 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".
ConstructorCreates a new without text.Constructor
Pointer to the C object.
Internal constructorThis is an internal constructor, and should not be used by user code.Constructor
The text of the label. Pass for no text.
Creates a new label with the given text inside it. You can
pass to get an empty label
widget.
Creates a new label with the given text inside it. You can
pass to get an empty label
widget. If contains an underscore,
the property is
automatically set to .
EventGLib.Signal("activate-current-link")System.EventHandlerTo be added.To be added.EventGLib.Signal("activate-link")Gtk.ActivateLinkHandlerTo be added.To be added.PropertyGLib.Property("angle")System.DoubleTo be addeda To be addedPropertyGLib.Property("attributes")Pango.AttrListThe attribute list set on the label.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.
EventGLib.Signal("copy-clipboard")System.EventHandlerEmitted when text is copied to the clipboard.PropertySystem.StringTo be added.To be added.To be added.PropertyGLib.Property("cursor-position")System.Int32The current position of the insertion cursor in characters.The current position of the insertion cursor in charactersPropertyGLib.Property("ellipsize")Pango.EllipsizeModeTo be addeda To be addedMethodSystem.Void
To be added.
To be added.
To be added.To be added.MethodSystem.Boolean
To be added.
To be added.
To be added.To be added.To be added.PropertyGLib.GTypeGType Property.a Returns the native value for .PropertyGLib.Property("justify")Gtk.JustificationThe alignment of the lines in the text of the label relative to each otherThe 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.
PropertyGLib.Property("label")System.StringThe text from a label widget including any embedded underlines indicating mnemonics and Pango markup.The text of the label widget.You can include markup tags to change your text appearance. See for more information.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.BooleanToggles line wrapping within the GtkLabel widget. if the lines of the label are automatically wrapped.PropertyGLib.Property("wrap-mode")Pango.WrapModeIndicates the wrap mode for the label.a .PropertySystem.StringParses str which is marked up with the Pango text markup languagea GtkLabel
Parses which is marked up with the
Pango text markup language, setting the text of the label and
attribute list based on the parse results.
PropertySystem.String
Parses which is marked up with the
Pango text markup language, setting the text of the label and
attribute list based on the parse results.
a new label widget
Parses which is marked up with the
Pango text markup language, setting the text of the label and
attribute list based on the parse results. If characters
in the string 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 .
PropertyGLib.Property("max-width-chars")System.Int32To be addeda To be addedPropertyGLib.Property("mnemonic-keyval")System.UInt32The mnemonic accelerator key for this label.The mnemonic accelerator key for this label.PropertyGLib.Property("mnemonic-widget")Gtk.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.EventGLib.Signal("move-cursor")Gtk.MoveCursorHandlerEmitted when the cursor is moved.MethodGtk.Label
a Basic constructor.a MethodGLib.DefaultSignalHandler(ConnectionMethod="OverrideActivateCurrentLink", Type=typeof(Gtk.Label))System.VoidTo be added.To be added.MethodGLib.DefaultSignalHandler(ConnectionMethod="OverrideActivateLink", Type=typeof(Gtk.Label))System.Boolean
To be added.
To be added.To be added.To be added.MethodGLib.DefaultSignalHandler(ConnectionMethod="OverrideCopyClipboard", Type=typeof(Gtk.Label))System.VoidDefault handler for the event.Override this method in a subclass to provide a default handler for the event.MethodGLib.DefaultSignalHandler(ConnectionMethod="OverrideMoveCursor", Type=typeof(Gtk.Label))System.Void
a
a
a Default handler for the event.Override this method in a subclass to provide a default handler for the event.MethodGLib.DefaultSignalHandler(ConnectionMethod="OverridePopulatePopup", Type=typeof(Gtk.Label))System.Void
a Default handler for the event.Override this method in a subclass to provide a default handler for the event.PropertyGLib.Property("pattern")System.StringA string with _ characters in positions correspond to characters in the text to underline.To be added.EventGLib.Signal("populate-popup")Gtk.PopulatePopupHandlerEmitted when a right-click pop-up menu is displayedPropertyGLib.Property("selectable")System.BooleanToggle whether or not the label allow the user to select text from the label, for copy-and-paste. if the label is selectable, and
if not.
PropertyGLib.Property("selection-bound")System.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.MethodSystem.Void
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.
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.
PropertyGLib.Property("single-line-mode")System.BooleanTo be addeda To be addedPropertySystem.StringThe text within the widget.a
When setting the text within the widget, it overwrites any text that was there before.
PropertySystem.StringSets the text of the labelTo be added.
Sets the text of the label. 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 .
PropertyGLib.Property("track-visited-links")System.BooleanTo be added.To be added.To be added.PropertyGLib.Property("use-markup")System.BooleanWhether the label's text is interpreted as marked up with the Pango text markup language ( more information at http://developer.gnome.org/doc/API/2.0/pango/PangoMarkupFormat.html ). if the label's text should be parsed for markupHere are a few examples of the markup you can use:
TagDescription<b>Bold<big>Makes font relatively larger<i>Italic<s>Strikethrough<sub>Subscript<sup>Superscript<small>Makes font relatively smaller<tt>Monospace font<u>Underline
Gtk.Label label = new Gtk.Label();
label.LabelProp = "The brown <u>fox</u> etc. and the <big>lazy</big> dog";
label.UseMarkup = true;
PropertyGLib.Property("use-underline")System.Boolean
Whether an underline in the text indicates the next
character should be used for the mnemonic accelerator key.
Whether an underline in the text indicates the next
character should be used for the mnemonic accelerator key.
PropertyGLib.Property("width-chars")System.Int32To be addeda To be addedPropertyGLib.Property("wrap")System.BooleanWhether lines should be wrapped if the text becomes too wide.whether lines should be wrapped