How to close gwindow by automatially

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to close gwindow by automatially

mrzung
Hi, all

I am using gWidgets for making gui, and in trouble with closing gwindow.

I want to close gwindow "A" by automatically when I click a button in gwindow "A" that loads another gwindow "B" .

for example.

A<-gwindow(visible=FALSE)
open<-gbutton(cont=A,"open new window",handler=function(h,...){visible(B)<-TRUE})
visible(A)<-TRUE

B<-gwindow(visible=FALSE)
result<-gtext(cont=B,"Your target is got")


How can I close the previous window when I open a new window?
Reply | Threaded
Open this post in threaded view
|

Re: How to close gwindow by automatially

jverzaniNWBKZ
mrzung <mrzung46 <at> gmail.com> writes:

>
> Hi, all
>
> I am using gWidgets for making gui, and in trouble with closing gwindow.
>
> I want to close gwindow "A" by automatically when I click a button in
> gwindow "A" that loads another gwindow "B" .
>
> for example.
>
> A<-gwindow(visible=FALSE)
> open<-gbutton(cont=A,"open new
> window",handler=function(h,...){visible(B)<-TRUE})


In the handler just add the call dispose(A).

If you want, feel free to email me these questions.

--John

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.