This code will produce a vertical list of buttons. How do I create a horizontal list of buttons each having a different command
function?
f.frame <- tkframe (w.top)
for(i in 1:10)
tkpack (tkbutton (f.frame));
tkgrid (f.frame, pady=15);
I don't know r, but the pack command accepts options, such as side
. For a horizontal row you would pack everything on the left or right side. The default is "top", which yields a vertical stack.
Try this:
tkpack (tkbutton (f.frame), side="left")
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.