Re: Couple of Dynamic-4GL questions using input array
Posted in 1998
Candy, I have to say that this looks like an awfully difficult way to present a menu in 4gl. Try not using a form but simply opening a window and displaying using the "display at" statement. I have a tool kit called Power-4gl for Informix-4gl which solves these kinds of user interface issues. Included are easy ways to produce vertical menus, pick lists and on-screen reports. A menu like the one you are using might be coded as follows: call menuopen("THE MENU TITLE","","") ... call menuline("The first item","f") call menuline("The second item","f") ... call menusetup() while true case menuman() when 0 exit while when 1 ... when 2 ... ... end case end while call menuclose() Menus are normally used for fixed selections to navigate an application. Pick lists are more flexible and are based on a database select statement, presenting a scrollable list. A pick list example would be as follows: call listopen("THE LIST TITLE","","","","") ... call listsetup(tab_cl,col_cl,format,where_cl,order_cl,"") while true call listman() returning action,rowid case action when "enter" ... when "exit" ... ... end case end while call listclose() For more information, refer to the web address below. Included is a downloadable freeware version with source code. Note that Power-4gl has not yet been tested/ported to Dynamic-4gl but you are welcome to grab ideas from the source code. ---------------------------------------------------------------------- John H. Frantz Power-4gl: Extending Informix-4gl john@rl.is http://www.rl.is/~john/pow4gl.html Candy McCall wrote: > > I have a form: > > DATABASE formonly > SCREEN > { > [a |b|c |d|e] > [a |b|c |d|e] > [a |b|c |d|e] > [a |b|c |d|e] > [a |b|c |d|e] > [a |b|c |d|e] > [a |b|c |d|e] > } > END > ATTRIBUTES > a = formonly.des1,NOENTRY; > b = formonly.buffer1,AUTONEXT; > c = formonly.des2,NOENTRY; > d = formonly.buffer2,AUTONEXT; > e = formonly.nextrow,NOENTRY; > END > INSTRUCTIONS > DELIMITERS " "; > SCREEN RECORD s_menu[7] (formonly.des1,formonly.buffer1, > formonly.des2,formonly.buffer2,formonly.nextrow) > > that is used in 4GL to simulate a menu. It can simulate a 2 column menu > in that as the user moves the cursor with the arrow keys, I can highlight > a particular column by using a statement such as: > DISPLAY .... TO s_menu[k].buffer1,s_menu[k].des1 ATTRIBUTE(REVERSE) > where k is the row > to be highlighted. > Well, this works great in I4gl. But now in Dynamic-4GL it doesn't work > the same way. > First of all, the two entry fields show as empty boxes on the form (in 4GL > they were not > visible) and cosmetically the form doesn't look good. And, also, when I use > the > DISPLAY ..... ATTRIBUTE(REVERSE) as above, the entire row is highlighted > instead of > the desired fields so I don't have the same visual effect. > I was wondering if there is something I can change for the XTERM termcap > for > one to cause it to highlight just some of the fields instead of the entire > row. > I've seen mentioned somewhere an INVISIBLE attribute field for a form. Can > you set this > on an entry field? > Does anyone have any ideas so I can get my desired behavior? > > Thanks! > > Candy > -- > Candy McCall > ONLINE Computing, Inc. > (candym@olcinc.com)