[fxruby-users] [Foxgui-users] SEL_MAXIMIZE, SEL_MINIMIZE, and SEL_RESTORE not working for FXMainWindow
rmelton at ball.com
Thu Jan 10 14:27:48 EST 2008
Using the SEL_CONFIGURE I can detect maximizes and minimizes. What I
wanted to do was to not let a user maximize the window sometimes. Can I
do this with SEL_CONFIGURE?
From: Jeroen van der Zijp [mailto:jeroen at fox-toolkit.org]
Sent: Thursday, January 10, 2008 12:12 PM
To: foxgui-users at lists.sourceforge.net
Cc: Melton, Ryan; fxruby-users at rubyforge.org
Subject: Re: [Foxgui-users] SEL_MAXIMIZE, SEL_MINIMIZE, and SEL_RESTORE
not working for FXMainWindow
On Thursday 10 January 2008 12:58:34 pm Melton, Ryan wrote:
> 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
> 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"
> self.connect(SEL_MAXIMIZE) do |sender, sel, data|
> puts "MAXIMIZE"
> self.connect(SEL_RESTORE) do |sender, sel, data|
> puts "RESTORE"
> self.connect(SEL_MINIMIZE) do |sender, sel, data|
> puts "MINIMIZE"
> def create
> application = FXApp.new("Test", "Test")
The messages are generated when notify=true is passed when these
minimize() [etc] are called. When its done by the user, you just get
Note that if you need to find out minimized, maximized state, you can
the isMaximized() and isMinimized() API's. They should give the correct
answer even if maximization was done by the user rather than
Hope this helps,
This message and any enclosures are intended only for the addressee. Please
notify the sender by email if you are not the intended recipient. If you are
not the intended recipient, you may not use, copy, disclose, or distribute this
message or its contents or enclosures to any other person and any such actions
may be unlawful. Ball reserves the right to monitor and review all messages
and enclosures sent to or from this email address.
More information about the fxruby-users