xgen

Paul Loechl loechl at zorro.cecer.army.mil
Fri Apr 23 14:15:16 EDT 1993


In an E-mail message, Teresa Hansen wrote:
> 
> Hi all you xgen user's (and creators - Kurt)
> 
> I have written an xgen script, and now I want to modify some of 
> the pulldown menus.  Presently on the menus there is a label a
> static button and a dynamic button.  When this menu is in view
> there is a scroll bar at the right side.  When using the scroll-
> ing device the label and static button scroll up, out of view of
> the menu.  This is not a great problem, mostly a peculiarity to
> my users who would like to see the label and static button remain
> in view at all times, while still being able to scroll through the
> other items lited (in the dynamic buttons).  Does anyone have a 
> solution to this?
> 
> Teresa Hansen
> lewis!teresa at cerl.cecer.army.mil
> 206-967-5337
> 
> Thankyou!
> 

In order to prevent the labels and static buttons from scrolling out of view
when you use the scroll bar, you should use the xgen tool called "list".
There are several types of lists:

	Single (listtype:single) One selection at a time by clicking with the
		mouse.

	Multiple (listtype:multiple) Several picks allowed by clicking with the
		left mouse button. All selections remain highlighted.

	Extended (listtype:extended) Several picks allowed by holding mouse
		 button down and dragging.  All selections remain highlighted.

	Browse (listtype:browse) Similar to extended except that only one
		file is highlighted at a time.
	
The following xgen script can be used as an example:
#define cent alignment:center
#define back background:white
#define fore foreground:white

environment start
        initialshells:"One"
        sethome:"!cd"
{
        commandboard One
                x:800 y:100
        (
                label "This is an Example"
                        x:0 y:0 cent back ;
                button abc
                        titlestring:"Exit"
                        x:0 y:30 width:100 fore cent
                        exit:0 ;
                list reporter
                        x:0 y:70
                        updatefrom:"!ls $home"
                        visibleitems:11
                        listtype:single
                        listseparator:"," ;
                /* The button below is only an example */
                button "Select"
                        x:0 y:280 width:80 alignment:center
                        setFILE:"[reporter]"
                        runforeground:"cd $LOCATION/paint; if test \"[reporter]\"; then echo 'vector [reporter]' >> $FILENAME; fi"
                        popdown:One
                        popup:Something ;
        )
}



________________________
Paul Loechl				loechl at zorro.cecer.army.mil
USA CERL				1800-USA-CERLx668



More information about the grass-user mailing list