Widgets questions [message #832] |
Wed, 05 May 1993 18:33 |
ushomirs
Messages: 14 Registered: May 1993
|
Junior Member |
|
|
I'm a beginner at this, so pardon me if I'm asking silly questions. I checked
out the FAQ and could not find the answers.
I am writing a widgets program to browse a binary file that consists of rows
of numbers in some particular format. I want to be able to display several
(say 15 or 20) lines at a time and let the user scroll through the table. Once
the appropriate row is located a user should be able to click on it and
bring up an edit box in which some values could be changed. Note that using
and editable text control doesn't work as the file is binary and the rows
need to be translated into readable format. Using WIDGET_LIST doesn't work
either because it requires all of the rows in the file to be loaded at once
and my files are about 10MB (~ million rows) in size.
Given the above complications I decided to have a separate WIDGET_LIST with 15
lines and a WIDGET_SLIDER. Each time the slider is moved I would get its value,load the appropriate lines from the file and display them. It would be very
nice to be able to have the value of the slider be equal to the row number in
my file. But I won't know the number of rows until the file is opened and
the header is read. Thus the question is :
Is it possible to change the minimum and maximum values of a WIDGET_SLIDER after it has been created?
I have also tried to create the slider on top of a WIDGET_BASE that has
already been /REALIZEd. While this displays the slider it does not let me
move the handle or ger events from it. I am doing something like this:
base=widget_base()
...
widget_control,base,/REALIZE
xmanager,"name",base
...
in the name_event handler routine after I find out number of rows I try to
slider=WIDGET_SLIDER(base,MINIMUM=x,MAXIMUM=Y)
the above displays the slider, but I can't move the handle, etc.
I have tried to /REALIZE it, hand it off to XMANAGER, etc. to no avail.
Is there a way around it?
While I'm asking questions, here is another one. Suppose I create a common
block in a program. Then, as I continue writing it I find a need to add
a couple of new variables to the above common block. If I do so and then try
to compile the program IDL complains that I'm trying to extend a common block.
So, I gotta exit IDL, restart it, and then recompile the program. Quite
annoying. Is there a way around it?
Thanks in advance for suggestions
Greg.
PS. I am using IDL 3.0.1 for MS Windows if it makes a difference.
|
|
|