using multiple windows

146 views
Skip to first unread message

philippe fullsack

unread,
May 15, 2015, 6:22:06 AM5/15/15
to dislin...@googlegroups.com
I am familiar with the basics of dislin. However I would like to know how to call a child window form (ic) from a parent window (ip) wihout opening a NEW form. The child form is called on a button press in the parent form. I would like the parent window to disappear, be replaced by the  child window, and on quitting the chid form, have the parent window restored. 
pf

Helmut Michels

unread,
May 18, 2015, 6:00:10 AM5/18/15
to dislin...@googlegroups.com
Hi Philippe,

if the parent window should disappear, you have to delete it before creating the child window, and then create the parent
window again. Something like in the following C code:

-------
#include <stdio.h>
#include "dislin.h"

void main_window ();
void child_window ();
void mycbk (int id);

void main ()
{
  while (1)
  { main_window ();
    child_window ();
  }
}

void main_window ()
{ int ip, id, id_lab;

  ip = wgini ("vert");
  id_lab = wglab (ip, "Main Window");
  id = wgpbut (ip, "Call Child Window");
  swgcbk (id, mycbk);
  wgfin ();


void child_window ()
{ int ip, id_lab, id_ok;

  ip = wgini ("vert");
  id_lab = wglab (ip, "Child Window");
  id_ok = wgok (ip);
  wgfin ();
}

void mycbk (int id)
{
  sendok ();    /* closes the main window */
}

------

Best regards,

Helmut

Fernando Acácio Monteiro dos Santos

unread,
May 21, 2015, 2:32:27 PM5/21/15
to dislin...@googlegroups.com

​Dear Helmut,

just a question: is there the possibility to print a table in a PNG file?

Best regards and thanks for your help


Fernando A. Monteiro Santos
________________________________
University of Lisbon - DEGGE-IDL
Campo Grande Ed. C8, 1749-016 Lisboa
Portugal
 

De: dislin...@googlegroups.com <dislin...@googlegroups.com> em nome de Helmut Michels <mic...@dislin.de>
Enviado: 18 de maio de 2015 11:00
Para: dislin...@googlegroups.com
Assunto: Re: using multiple windows
 
--
You received this message because you are subscribed to the Google Groups "dislin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dislin-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

philippe fullsack

unread,
May 22, 2015, 4:15:24 PM5/22/15
to dislin...@googlegroups.com
Thank you Helmut :)

philippe fullsack

unread,
Jun 3, 2015, 7:39:56 AM6/3/15
to dislin...@googlegroups.com
Hi Helmut,

If window W has k potential children but we do not know ahead of time which child will be called, for example, if we open a window Wc from a menu in window W, how should I proceed? (if you can indicate a small example, this would help a lot),
Again, many thanks,

Philippe

philippe fullsack

unread,
Jun 3, 2015, 8:10:35 AM6/3/15
to dislin...@googlegroups.com
Would Calling wgfin on entering the child window subroutine  achieve the desired result?

philippe fullsack

unread,
Jul 23, 2015, 1:17:37 PM7/23/15
to dislin-users, mic...@dislin.de
Hi Helmut,

I have followed your model and it works nicely.
I used a main window with two buttons which each call a child window.
Everything is fine except for a detail:
when a window is closed and another is open, there is a short instant in which there is no window and this creates a visual anomaly: the transition is not 'smooth' or invisible.
Is there a way to repair this?


On Monday, May 18, 2015 at 7:00:10 AM UTC-3, Helmut Michels wrote:
Reply all
Reply to author
Forward
0 new messages