• widget multiple window plot

    From Sapna Mishra@21:1/5 to All on Mon Mar 5 06:22:59 2018
    Dear All,

    I am using IDL 7.0 version. I am trying to make a GUI for some of my science goals. I am creating 2 plots in same GUI by dividing the widow in two giving two
    window_draw IDs. But the problem I am facing each time I am creating the plot, my plot is coming on to the last defined ID of window_draw. These
    are the commands I am using:

    base = WIDGET_BASE( title = 'sdss_fixmgii: Check spectra', /row, $
    UNAME='BASE', /tlb_size_events, xoffset=200L)
    state.base_id = base


    state.left_id = WIDGET_BASE( state.base_id, /column, $
    /base_align_center,/align_center, $
    xsize=round(3*xsize/4), $
    ysize=ysize, $
    uvalue='LEFT)BASE', frame=2)
    state.draw_base_id = widget_base(state.left_id, /column, /base_align_left, $
    xsize=round(3*xsize/4), $
    ysize=round(4*ysize/5), $
    uvalue='DRAW_BASE', frame=2, $
    /tracking_events)
    state.si2_id = widget_draw(state.draw_base_id, xsize=round(3*xsize/4.), $
    ysize=round(4*ysize/5), /frame, retain=2, $
    uvalue='SI2DRAW', /button_even, /motion_events)

    state.right_id = WIDGET_BASE( state.base_id, /row, $
    /base_align_center,/align_center, $
    xsize=round(xsize/4.), ysize=ysize, $
    uvalue='TOP_BASE', frame=2)
    state.mdraw_id = widget_draw(state.right_id, xsize=round(xsize/4.), $
    ysize=ysize, /frame, retain=2, $
    uvalue='MDRAW')

    WIDGET_CONTROL, base, /realize
    WIDGET_CONTROL, base , set_uvalue = d1index, /no_copy
    xmanager, 'new_wid', base

    Can anyone help me?


    Thanks in advance!!!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Guilherme Gualda@21:1/5 to All on Mon Mar 5 14:36:46 2018
    Hi Sapna,

    If I understand your problem correctly, all you need to do is use WSET to choose which is the active draw window prior to invoking commands that draw things in each of the draw windows:
    https://www.harrisgeospatial.com/docs/wset_procedure.html

    You will need to retrieve the window id in order to use WSET. You can do that using the GET_VALUE keyword of WIDGET_CONTROL.

    Hope this helps!

    Best,

    Guil

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)