I want to display some points in a section of a window using bullets similar to the HTML <li>. Is that possible in FXRuby? I couldn''t find any examples to help me do this. I am trying to put these points into a label field - e.g.: bullet_point_1 = FXLabel.new(contents, " o Something important") I tried pasting the actual symbol into the string but it displays a square in the app UI. How can I show symbols? I was also wondering about the copyright (c) symbol. Please let me know. Thanks. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20100330/63e22d3f/attachment.html>
Bartosz DziewoĆski
2010-Mar-31 11:18 UTC
[fxruby-users] Can you display bullets in labels?
If I were you, I''d just add small round icon to the label and place it to the left using layout hints. (http://www.fxruby.org/doc/api/classes/Fox/FXLabel.html) -- Matma Rex - http://matma-rex.prv.pl/
On Tue, Mar 30, 2010 at 5:17 PM, Paul Carvalho <tester.paul at gmail.com> wrote:> I want to display some points in a section of a window using bullets similar > to the HTML <li>. ?Is that possible in FXRuby? ?I couldn''t find any examples > to help me do this. > I am trying to put these points into a label field - e.g.: > bullet_point_1 = FXLabel.new(contents, " o Something important") > > I tried pasting the actual symbol into the string but it displays a square > in the app UI. ?How can I show symbols? ?I was also wondering about the > copyright (c) symbol.It''s possible (well, likely) that the bullet symbol that you pasted in failed to display properly because it wasn''t there in the font that your UI was using. You''d want to first confirm that those characters (bullet, or copyright) are available in your GUI''s font, and then find out what character code to embed in the string. If you just wanted bullets, I also second Bartosz''s suggestion of adding an icon to the label, on its left side.
On 31 March 2010 10:44, Lyle Johnson wrote:> > It''s possible (well, likely) that the bullet symbol that you pasted in > failed to display properly because it wasn''t there in the font that > your UI was using. You''d want to first confirm that those characters > (bullet, or copyright) are available in your GUI''s font, and then find > out what character code to embed in the string. >I thought the same thing - which explains why a square appeared in the UI when I included the bullet char in the string. Then I tried adding ascii codes to strings (e.g. {..) to see if they would display but that doesn''t work either. I did manage to display the copyright symbol because it appears low enough in the ascii table and is part of all the system fonts. No luck with the bullet symbol though unless I change the font.> > If you just wanted bullets, I also second Bartosz''s suggestion of > adding an icon to the label, on its left side. > >Add an icon as in a graphic image file? I can''t say that I thought of that as an option. I could do that but this app is small and I want to keep it simple. I''d rather go with (ascii) asterisks before I add a graphic bullet image. Not as pretty, but good enough. Thanks for the info. Cheers. Paul. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20100331/f8877cdf/attachment.html>