X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 27 Oct 2010 11:49 AM by  anon
Scroll bars missing/disappear on Windows platform
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
27 Oct 2010 11:49 AM
    Problem: I have a widget application that I developed on my Unix/Mac system and displays the necessary scroll bars just fine unless I run it on a Windows system in which case the scroll bars don't appear at all. Supporting Info: On my Unix/Mac, the scroll bars are automatically adjusted according to the size of the top level widget base which changes to facilitate the changing contents of the lists inside of it, accomplished by including the scroll keyword when the top widget_base is created, along with xsize, ysize, x_scroll_size, and y_scroll_size keywords. I do have a base resize event (that changes the keywords xsize, ysize, scr_xsize, and scr_ysize) that again works just fine on my Unix/Mac, but interestingly by calling the resize event on Windows I can temporarily make the scroll bars appear, that is until any change is made to the contents of internal widgets - this seems to be the root cause of my problem: that whenever a child widget is changed, the top level base's scroll bars disappear. Anyone know how to work this problem? Thanks much, Luke

    Deleted User



    New Member


    Posts:
    New Member


    --
    29 Oct 2010 10:14 AM
    Can you provide an short example widget that exhibits this behavior? Which version of Windows are you running? Which version of IDL? -Josh

    Deleted User



    New Member


    Posts:
    New Member


    --
    29 Oct 2010 03:52 PM
    Yeah, I'm coding with version 7.1 on my Mac OS 10.5 and running on versions 8.0 on a Windows XP and 6.4 on a Windows Vista (backwards, I know..) Here is some quick code I wrote up that seems to react pretty much the same way as my original program: pro TestSB_event, ev common all, ids case ev.id of ids.baseID: begin topbasesize = [ev.x, ev.y] mapsize = ulong([.95,1.5]*topbasesize) widget_control, ev.id, xsize=topbasesize[0], ysize=topbasesize[1] widget_control, ev.id, scr_xsize=topbasesize[0], $ scr_ysize=topbasesize[1] widget_control, ids.drawID, xsize=mapsize[0], ysize=mapsize[1] widget_control, ev.id, /clear_events end ids.buttonID: begin widget_control, ev.top, /destroy return end else: & endcase end pro TestSB common all, ids ;Initialize variables ids = {baseID:0L, buttonID:0L, drawID:0L} ;Set base sizes topbasesize = ulong([.9,.9]*get_screen_size()) mapsize = ulong([.95,1.5]*topbasesize) ;Create widgets ids.baseID = widget_base(/base_align_center, /column, map=0, /scroll, $ /tlb_size_events, xsize=topbasesize[0], ysize=topbasesize[1], $ x_scroll_size=topbasesize[0], y_scroll_size=topbasesize[1]) ids.buttonID = widget_button(ids.baseID, value='Done') ids.drawID = widget_draw(ids.baseID, xsize=mapsize[0], ysize=mapsize[1], $ frame=2) labelID = widget_label(ids.baseID, value='Can you see me??') ;Give user control widget_control, ids.baseID, /realize, /map xmanager, 'TestSB', ids.baseID, /no_block end

    Deleted User



    New Member


    Posts:
    New Member


    --
    02 Nov 2010 03:19 PM
    Try using SCR_XSIZE and SCR_YSIZE for your widget base instead of XSIZE and YSIZE. I made this change to your code and I was able to get the scroll bars on a windows machine as well as a unix machine. -Josh

    Deleted User



    New Member


    Posts:
    New Member


    --
    03 Nov 2010 04:37 PM
    Thanks Josh!!
    You are not authorized to post a reply.