Upgrade to v2.6
Fyne API v2.6
app
canvas
container
data/binding
data/validation
dialog
driver
driver/desktop
driver/embedded
driver/mobile
driver/software
lang
layout
storage
storage/repository
test
theme
widget
package widget
Accordion
Accordion
AccordionItem
AccordionItem
Activity
Activity
BaseWidget
BaseWidget
Button
Button
ButtonAlign
ButtonAlign
ButtonIconPlacement
ButtonIconPlacement
ButtonImportance
ButtonImportance
ButtonStyle
ButtonStyle
Calendar
Calendar
Card
Card
Check
Check
CheckGroup
CheckGroup
CustomTextGridStyle
CustomTextGridStyle
DateEntry
DateEntry
DisableableWidget
DisableableWidget
Entry
Entry
FileIcon
FileIcon
Form
Form
FormItem
FormItem
GridWrap
GridWrap
GridWrapItemID
GridWrapItemID
Hyperlink
Hyperlink
HyperlinkSegment
HyperlinkSegment
Icon
Icon
ImageSegment
ImageSegment
Importance
Importance
Label
Label
List
List
ListItemID
ListItemID
ListSegment
ListSegment
Menu
Menu
Orientation
Orientation
ParagraphSegment
ParagraphSegment
PopUp
PopUp
PopUpMenu
PopUpMenu
ProgressBar
ProgressBar
ProgressBarInfinite
ProgressBarInfinite
RadioGroup
RadioGroup
RichText
RichText
RichTextBlock
RichTextBlock
RichTextSegment
RichTextSegment
RichTextStyle
RichTextStyle
Select
Select
SelectEntry
SelectEntry
Separator
Separator
SeparatorSegment
SeparatorSegment
Slider
Slider
Table
Table
TableCellID
TableCellID
TextGrid
TextGrid
TextGridCell
TextGridCell
TextGridRow
TextGridRow
TextGridStyle
TextGridStyle
TextSegment
TextSegment
Toolbar
Toolbar
ToolbarAction
ToolbarAction
ToolbarItem
ToolbarItem
ToolbarSeparator
ToolbarSeparator
ToolbarSpacer
ToolbarSpacer
Tree
Tree
TreeNodeID
TreeNodeID
Fyne API "widget.TextSegment"
widget.TextSegment
import "fyne.io/fyne/v2/widget"
Usage
type TextSegment
type TextSegment struct {
Style RichTextStyle
Text string
}
TextSegment represents the styling for a segment of rich text.
Since:
2.1
func (*TextSegment) Inline
func (t *TextSegment) Inline() bool
Inline should return true if this text can be included within other elements, or false if it creates a new block.
func (*TextSegment) Select
func (t *TextSegment) Select(begin, end fyne.Position)
Select tells the segment that the user is selecting the content between the two positions.
func (*TextSegment) SelectedText
func (t *TextSegment) SelectedText() string
SelectedText should return the text representation of any content currently selected through the Select call.
func (*TextSegment) Textual
func (t *TextSegment) Textual() string
Textual returns the content of this segment rendered to plain text.
func (*TextSegment) Unselect
func (t *TextSegment) Unselect()
Unselect tells the segment that the user is has cancelled the previous selection.
func (*TextSegment) Update
func (t *TextSegment) Update(o fyne.CanvasObject)
Update applies the current state of this text segment to an existing visual.
func (*TextSegment) Visual
func (t *TextSegment) Visual() fyne.CanvasObject
Visual returns the graphical elements required to render this segment.