Benjamin Sebastian Kolz
2009-Nov-14 16:55 UTC
[fxruby-users] FXRuby/ questions about fotos
Hi everybody, I''ve got two questions mainly about fotos in FX Ruby. I read the FX Ruby book and I''m using the "scale to thumbnail" method in my project. Extract from the main code: @logo="logo_small.jpeg" logo_load=ImageViewer.new(self, at logo) 1. How can I position the foto in the window? If I create a bottom, f. ex., I have LAYOUT_EXPLICIT, :x => 50, :y => 200, :width => 200, :height => 200, but how can I select the x- and y-value for the foto? Any idea? 2. I would like to put this logo also into the title bar... is that possible? some code: class Main_Window < FXMainWindow def self.toggle(nr, *args) @@switcher.setCurrent(nr) @@window[nr].set_text(args[0].to_s) end def initialize(app) super(app, ''Title bar text'', :width=>800, :height=>600) # can I add a foto (logo) to the text in the title bar? init_frameset end Thanks in advance for any response! Have a nice weekend Benjamin _________________________________________________________________ http://redirect.gimas.net/?n=M0911xMSWin72 Windows 7 - jetzt upgraden! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20091114/5ce67cfe/attachment.html>
On Sat, Nov 14, 2009 at 10:55 AM, Benjamin Sebastian Kolz <benjaminrub-upf at hotmail.de> wrote:> I''ve got two questions mainly about fotos in FX Ruby. > > I read the FX Ruby book and I''m using the "scale to thumbnail" method in my > project.OK.> Extract from the main code: > > @logo="logo_small.jpeg" > logo_load=ImageViewer.new(self, at logo) > > > 1. How can I position the foto in the window? If I create a bottom, f. ex., > I have > ?? LAYOUT_EXPLICIT, :x => 50, :y => 200, :width => 200, :height => 200, but > how can > ?? I select the x- and y-value for the foto? Any idea?Well, without any of the code for your ImageViewer class, I don''t know how to answer that question.> 2. I would like to put this logo also into the title bar... is that > possible?Yes, I think that''s what the "miniIcon" argument is for in FXMainWindow''s constructor.