Hey!
I would need a popup window like this (not necessarily associated to a
taskbaricon):
I should be possible to show such a window for a certain time,
displaying a certain message.
Is a similar thing possible with wx? Are there oder options?
thx ck
Hey Ck,
On 12/10/07, Christian K. [email protected] wrote:
Hey!
I would need a popup window like this (not necessarily associated to a
taskbaricon):
DuckDuckGo — Privacy, simplified.
Graphically wise, no, that’s something that you would have to
specifically
setup to be drawn. But, window popup wise, yes, you can setup a
Wx::MiniFrame to create the said popup window. And by utilizing Wx::
SystemSettings.get_metric(Wx::SYS_SCREEN_X) and Wx::
SystemSettings.get_metric(Wx::SYS_SCREEN_Y) you should be able to
determine
the size of the screen to position your “popup notification” to show,
and
hide.
A quick and dirty example would be:
class MyPopupWin < Wx::MiniFrame
def initialize(parent,timeout)
super(parent)
@timer = Timer.new(self,10001)
evt_timer(10001) do { @timer.stop; self.show(false); }
self.show(true)
@timer.start(timeout)
end
end
Note, this is not tested code, just quick spur of the moment type
design,
but general idea should be there for you to use.
L8ers,
Mario S.
I should be possible to show such a window for a certain time,
Mario S. wrote:
class MyPopupWin < Wx::MiniFrame
def initialize(parent,timeout)
super(parent)
@timer = Timer.new(self,10001)
evt_timer(10001) do { @timer.stop; self.show(false); }
self.show(true)
@timer.start(timeout)
end
end
Does a Wx::MiniFrame need a parent window? I doesn’t have a parent
window, just a taskbaricon. When i pass nil to the constructor it
generates an error.
greets ck
Wx::MiniFrame does need a Parent Window in order to be created, but not
shown. You can create a Simple Window, for the Parent, but that window
should not need to be shown in order for the Wx::MiniFrame to be shown.
L8ers,
Mario S.