[fxruby-users] foxGUIb - how do you insert a title bar icon?

Paul Carvalho tester.paul at gmail.com
Tue Mar 23 12:01:42 EDT 2010


On 23 March 2010 11:33, Meinrad Recheis wrote:

> Wait, maybe I got you wrong.
> Mind this: foxguib is generating FXRuby code so why should you not be able
> to set the icon as you said you know how to do it using plain FXRuby. Maybe
> this is a problem about calling the icon's "create" method at the wrong time
> or not at all?
>
> I am afraid without detailed error messages I can not help out here.
>
> -- henon
>
>
Since I don't know where & how to set the icon with the FoxGUIb code, I
don't know which error messages you would be interested in.  All you have to
do is generate a quick window and try to set the image.

Here's a sample window.  How would you display an icon in the title bar?

# source generated by foxGUIb 1.0.0

class MainWindow
    def initialize( parent)
        construct_widget_tree( parent)
        init if respond_to? 'init'
    end

    def construct_widget_tree( parent)
        @topwin=
        FX::MainWindow.new(parent){|w|
            @mainWindow=w
            w.wdg_name='mainWindow'
            w.width=336
            w.shown=true
            w.y=265
            w.height=183
            w.title="show title bar image"
            w.x=47
        }
    end
    attr_reader :topwin
    attr_reader :mainWindow
end

#unit test
if __FILE__==$0
    require 'libGUIb16'
    app=FX::App.new
    w=MainWindow.new app
    w.topwin.show(Fox::PLACEMENT_SCREEN)
    app.create
    app.run
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/fxruby-users/attachments/20100323/9ec43205/attachment.html>


More information about the fxruby-users mailing list