Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

svalue(gbutton_obj) <- "asdf" drops font attributes #65

Closed
landroni opened this issue Jul 25, 2014 · 2 comments
Closed

svalue(gbutton_obj) <- "asdf" drops font attributes #65

landroni opened this issue Jul 25, 2014 · 2 comments

Comments

@landroni
Copy link
Contributor

This seems related to #51.

Consider this:

w <- gwindow("Buttons", visible=T)
g <- ggroup(cont=w, horizontal=FALSE)
b1 <- gbutton("open", cont=g)
font(b1) <- list(weight = "bold")

Now:

 svalue(b1) <- "open1"

Notice that both the icon and the formatting disappears. I would have expected both to be preserved; well, if not the icon, at the very least the bold formatting should be preserved. Is this intended behaviour or a bug?

@jverzani
Copy link
Owner

It turns out to be a hassle to keep the font information. The underlying widgets don't do this, so I never thought to implement it, and likely won't. With Gtk you can provide the text using PANGO markup, very similar to HTML. With Qt you can use HTML. The tcltk widgets are not so easy.

@landroni
Copy link
Contributor Author

I see. But is it possible to retrieve current font information? I try font(b1), but it doesn't seem to retrieve anything (although the docs suggest it should). Am I doing it wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants