Skip to content

Table with button or other widget or click table field to launch dialog #1494

Closed Answered by kkoreilly
0pcom asked this question in Q&A
Discussion options

You must be logged in to vote

@0pcom Okay, here is a full example for how this can work. This code makes a table with buttons for the dates, and then clicking on one of those buttons takes you to a page with more details for that date (using core.Pages). Please let me know if you have any questions; I can give an example with links instead of buttons if you want. I will add this example to the website soon. I will respond to your questions about updating next.

package main

import (
	"cogentcore.org/core/core"
	"cogentcore.org/core/events"
	"cogentcore.org/core/icons"
)

var pg *core.Pages
var currentEntry int

func init() {
	core.AddValueType[Date, DateButton]()
}

type Entry struct {
	Date Date
	Info string
}

type D…

Replies: 2 comments 15 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
15 replies
@kkoreilly
Comment options

@0pcom
Comment options

@kkoreilly
Comment options

Answer selected by 0pcom
@kkoreilly
Comment options

@0pcom
Comment options

@kkoreilly
Comment options

@kkoreilly
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants