[fxruby-users] [Foxgui-users] SEL_MAXIMIZE, SEL_MINIMIZE, and SEL_RESTORE not working for FXMainWindow

Jeroen van der Zijp jeroen at fox-toolkit.org
Thu Jan 10 14:11:56 EST 2008


On Thursday 10 January 2008 12:58:34 pm Melton, Ryan wrote:
> Hi,
> 
> I am running on Windows XP SP2 using FXRuby 1.6.11 which uses FOX
> version 1.6.25.
> 
> The SEL_MAXIMIZE, SEL_MINIMIZE, and SEL_RESTORE handlers do not seem to
> ever get called for an FXMainWindow.
> 
> Can anyone else recreate this?  Here is a simple example program:  The
> SEL_CLOSE works but none of the other handlers.
> 
> 
> $VERBOSE = nil
> require 'fox16'
> $VERBOSE = true
> 
> include Fox
> 
> class Test < FXMainWindow
> 
>   def initialize(app)
>     super(app, "Test", nil, nil, DECOR_ALL, 0, 0, 750, 500)
> 
>     self.connect(SEL_CLOSE) do |sender, sel, data|
>       puts "CLOSE"
>       0
>     end
> 
>     self.connect(SEL_MAXIMIZE) do |sender, sel, data|
>       puts "MAXIMIZE"
>       0
>     end
> 
>     self.connect(SEL_RESTORE) do |sender, sel, data|
>       puts "RESTORE"
>       0
>     end
>     
>     self.connect(SEL_MINIMIZE) do |sender, sel, data|
>       puts "MINIMIZE"
>       0
>     end
>   end
>   
>   def create
>     super
>     show(PLACEMENT_SCREEN)
>   end
> end
> 
> application = FXApp.new("Test", "Test")
> Test.new(application)
> application.create
> application.run

The messages are generated when notify=true is passed when these maximize(),
minimize() [etc] are called.  When its done by the user, you just get
SEL_CONFIGURE messages.  

Note that if you need to find out minimized, maximized state, you can call
the isMaximized() and isMinimized() API's.  They should give the correct
answer even if maximization was done by the user rather than programmatically.


Hope this helps,

			Jeroen




More information about the fxruby-users mailing list