Questions tagged [fyne]

Questions related to Fyne UI of the Go language. Also add [go] tag to your question.

Fyne is a UI toolkit and app API written in Go. It uses OpenGL (through the go-gl and go-glfw projects) to provide cross platform graphics.

138 questions
6
votes
2 answers

Binding Table data in Go Fyne

Fyne beginner here. There is simple use case I'm trying to solve, without finding any solution in the docs: in Fyne, how to have a Table widget, with its data bound to a data source? In other words, we have the binding.BindStringList in the docs,…
user650108
  • 1,009
  • 1
  • 9
  • 18
5
votes
2 answers

How to change color of GUI components

I am trying following demo code of fyne: package main import ( "fyne.io/fyne/app" "fyne.io/fyne/widget" ) func main() { a := app.New() w := a.NewWindow("Hello") w.SetContent( widget.NewVBox( …
rnso
  • 23,686
  • 25
  • 112
  • 234
4
votes
1 answer

How to remove objects from golang fyne container

I am working on GUI application that will need to dynamically add and remove gui elements and I would like to know if there is a way to remove an element from golang fyne container. In the example code below I create the container and add elements…
medwed
  • 43
  • 4
3
votes
1 answer

Fyne Table not showing data initially

I have a Fyne table that I am populating with data type transaction struct { Name string Amount float64 Date time.Time Memo string } var transactions []transaction func init() {// Data population omitted } func makeCenter()…
Paul Waldo
  • 1,131
  • 10
  • 26
3
votes
1 answer

GUI via Fyne: changing elements on app page on button clicking

What is the best practice to change elements on an app page at button clicking. For example, I have such code package main import ( "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/widget" ) func main() { a :=…
3
votes
3 answers

Fyne List widget doesn't display items correctly

I'm trying to display the alphabet in a listwithdata widget. I am using a custom clickable label as the widget to display in the list. For some reason everything displays fine when the widget loads. But when I start scrolling the letters starts…
alex_bits
  • 642
  • 1
  • 4
  • 14
3
votes
2 answers

fyne GUI compile to Web Assembly failed

i was checking the possibility to use fyne in browser using Web Assembly , but i am getting error ... main.go : package main import ( "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/container" "fyne.io/fyne/v2/widget" ) func main() { a :=…
3
votes
2 answers

Using Fyne to bind a list widget to a slice of structs

I have a collection of data items and am trying to use Fyne to put together a GUI to edit the collection. I've figured out how to use binding to display the collection, but I can't figure out how to then be able to edit the items. Here's a slightly…
Matthew Burke
  • 2,295
  • 17
  • 14
3
votes
2 answers

glfw pkg-config error when building a fyne app

Golang code: package main import ( "fyne.io/fyne/app" "fyne.io/fyne/widget" ) func main() { application := app.New() window = application.NewWindow("Hello rohan") window.SetContent(widget.NewLabel("Hello again")) …
Rohan S
  • 45
  • 1
  • 7
3
votes
1 answer

Capture key down/up event

Is there a way to capture key down and key up events on a window? I know it's possible for a widget.Entry but is it for a whole fyne.Window or for a widget like widget.Group so I can use it as a global container? I also know it is possible to…
Elie G.
  • 1,514
  • 1
  • 22
  • 38
3
votes
1 answer

capture keyboard press event with fyne.io

Given below code that creates a new app window to display a picture from the local file system, how can I add support to detect a "keypress" event and quit the application? package main import ( "flag" _ "image/gif" _ "image/jpeg" _…
user4466350
3
votes
2 answers

How to add padding, font size and colours to fyne UI app

I have this sample app code below for a UI I'm implementing using the fyne toolkit, and cant figure out how to align the buttons to the left, makes top text bigger, and add colours. I've tried trying to create a custom theme to implement the UI…
Robman
  • 47
  • 1
  • 6
2
votes
1 answer

Running Docker container - X11 failed to open display :0

I have a project written in Golang using the Fyne framework. I am aware of the issues that are related to X11 when trying to Dockerize these type of applications. Here is my Dockerfile: FROM golang:1.20 WORKDIR /app COPY . . RUN go mod…
zayaanra
  • 50
  • 5
2
votes
1 answer

How to control photo dimensions in a Fyne window

I have tried to display a photo in a Fyne window but it is much smaller than I want it. With a window name "w", I used "w.setContent()" to display the photo. However, it is tiny and in the top left corner. I want to control the dimensions of the…
2
votes
2 answers

How to make label of fixed size

I can't understand how to make label with fixed size in Fyne. I can't find any method for it func main() { a := app.New() w := a.NewWindow("Fyne Demo") label1 := widget.NewLabel("Hello Fyne\n\nline\n\nline\n\nline\n\n\n\nline") …
Hotery
  • 21
  • 2
1
2 3
9 10