Skip to content

How do I set a table column to a specific width? #652

Closed Answered by gucio321
vbmark asked this question in Q&A
Discussion options

You must be logged in to vote
package main

import "github.com/AllenDang/giu"

func loop() {
	giu.SingleWindow().Layout(
		giu.Table().Columns(
			giu.TableColumn("State").InnerWidthOrWeight(20).Flags(giu.TableColumnFlagsWidthFixed),
		).Rows(
			giu.TableRow(
				giu.Label("1"),
			),
			giu.TableRow(
				giu.Label("2"),
			),
		),
	)
}

func main() {
	wnd := giu.NewMasterWindow("Width of table column [discussion 652]", 64, 480, 0)
	wnd.Run(loop)
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by vbmark
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