View Full Version : Pulldown Menus...?????????
01-01-1995, 02:00 AM
Does anybody know if you can have a pulldown menu within a pulldown menu? If s, where can I find the information on it and how many levels can I go? Thanks a lot.
08-09-2000, 08:44 AM
You can not display a PULLDOWN from a PULLDOWN. BUT. . . you can bring up a WINDOW with a SNGCHCFLD from a PULLDOWN. There is slightly more programming involved, but not much. The recent edition of MC shows examples of PULLDOWNs using the "push button" keyword rather than the SNGCHCFLD keyword. This is another option for use with PULLDOWNs or WINDOWs. As you have brought it up, The use of a PULLDOWN from anywhere is on my 5250 wish list. PULLDOWNs are very easy to use, and to program. I would also like to display the MENUBAR on any line of the screen. This is so header information (like Company name, screen title, user ID, etc.) can be displayed above the MENUBAR. Currently MENUBAR is restricted to the top line of the screen. Wouldn't it be great for a user to press F4, on a field, and have a PULLDOWN displayed with a list of choices? Dave
08-09-2000, 08:56 AM
Hmm, great. I will have to see about this. Maybe it will work for what I want to do. I agree, it would be great to be able to put the MENUBAR on any line. Seems really strange to restrict something like this to only the first line..? Although, there are many things I would like to see different that would help ALL AS/400 programmers. Maybe someday..? Thanks for the response.
08-10-2000, 06:36 AM
For some strange reason IBM restricted MENUBAR, PULLDOWN, and WINDOW to the file or record level, when in fact the 5250 data stream can implement them at the field level. DSM on the other hand can draw menu bars on any line, with or without pulldowns. Here is an example that displays a menu bar <font > color=green><u>J</u>anuary <u>F</u>ebruary <u>M</u>arch</font> in the middle of the screen, and then displays the selected option 1, 2, or 3. <pre> H dftactgrp( *no ) D ClrFldTbl PR extproc( 'QsnClrFldTbl' ) clear field table D CmdBuf 10I 0 D LowLevel 10I 0 const D ErrorCode 10I 0 const D CrtCmdBuf PR extproc( 'QsnCrtCmdBuf' ) create command buff D InitSize 10I 0 const D Increment 10I 0 const D Maximum 10I 0 const D CmdBuf 10I 0 D ErrorCode 10I 0 const D CrtInpBuf PR extproc( 'QsnCrtInpBuf' ) create input buffer D InitSize 10I 0 const D Increment 10I 0 const D Maximum 10I 0 const D CmdBuf 10I 0 D ErrorCode 10I 0 const D DltBuf PR extproc( 'QsnDltBuf' ) delete buffer D Buffer 10I 0 D ErrorCode 10I 0 const D InsCsr PR extproc( 'QsnInsCsr' ) insert cursor D FieldId 10I 0 const D Row 10I 0 const D Column 10I 0 const D CmdBuf 10I 0 D LowLevel 10I 0 const D ErrorCode 10I 0 const D ReadMDT PR extproc( 'QsnReadMDT' ) read modified fields D ControlChar1 1A const D ControlChar2 1A const D FldCnt 10I 0 D InpBuf 10I 0 D CmdBuf 10I 0 D LowLevel 10I 0 const D ErrorCode 10I 0 const D RtvDta PR extproc( 'QsnRtvDta' ) retrieve data D InpBuf 10I 0 D Data * D ErrorCode 10I 0 const D WrtSFMaj PR extproc( 'QsnWrtSFMaj' ) write major field D Data 32767A const D DataLength 10I 0 const D FieldId 10I 0 const D Row 10I 0 const D Column 10I 0 const D CmdBuf 10I 0 D LowLevel 10I 0 const D ErrorCode 10I 0 const D WrtSFMin PR extproc( 'QsnWrtSFMin' ) write minor field D Data 32767A const D DataLength 10I 0 const D CmdBuf 10I 0 D LowLevel 10I 0 const D ErrorCode 10I 0 const D WTD PR extproc( 'QsnWTD' ) write to display D ControlChar1 1A const D ControlChar2 1A const D CmdBuf 10I 0 D LowerLevel 10I 0 const D ErrorCode 10I 0 const D CmdBuf S 10I 0 D FldCnt S 10I 0 D InpBuf S 10I 0 D Data DS based( Data@ ) D Option 5I 0 overlay( Data : 7 ) * create command buffer C callp CrtCmdBuf( 6300 : 6300 : 0 : CmdBuf : 0 ) * create input buffer C callp CrtInpBuf( 6300 : 6300 : 0 : InpBuf : 0 ) * clear field table C callp ClrFldTbl( CmdBuf : 0 : 0 ) * write to display C callp WTD( X'00' : X'28' : CmdBuf : 0 : 0 ) * draw menu bar at row 10, column 28 C callp WrtSFMaj( C X'0014D95004080001F1F1F7000008010300000000' C : 20 : 0 : 10 : 28 : CmdBuf : 0 : 0 ) * draw menu bar choices C callp WrtSFMin( X'0D100800E000' + 'January' C : 13 : CmdBuf : 0 : 0 ) C callp WrtSFMin( X'0E100800E000' + 'February' C : 14 : CmdBuf : 0 : 0 ) C callp WrtSFMin( X'0B100800E000' + 'March' C : 11 : CmdBuf : 0 : 0 ) * draw menu bar separator C callp WrtSFMin( X'0809801C35222200' C : 8 : CmdBuf : 0 : 0 ) * insert cursor at row 10, column 29 C callp InsCsr( 0 : 10 : 29 : CmdBuf : 0 : 0 ) * read modified input fields C callp ReadMDT( X'00' : X'00' : C FldCnt : InpBuf : CmdBuf : 0 : 0 ) * retrieve data C callp RtvDta( InpBuf : Data@ : 0 ) * display option C sub 31 Option C dsply Option * delete command buffer C callp DltBuf( CmdBuf : 0 ) * delete input buffer C callp DltBuf( InpBuf : 0 ) C move *on *INLR</pre>
08-10-2000, 07:09 AM
A brilliant response, and an excellent article. I have a question: Do you have a personal preference for PUSHBUTTON over SNGCHCFLD for the PULLDOWN, or is there a very good reason to use one over the other? Dave
08-10-2000, 08:49 AM
I chose push buttons because they looked sexier in an illustration.
08-10-2000, 11:38 AM
I would like to use a PULLDOWN menu, but haven't. Placing one anywhere on the screen would be nice. The only "extra" I've actually put into production is PUSHBUTTONs. They look pretty cool and don't harm anything. That was the easiest to get past my team leader who would be happy working on a dummy terminal.
08-10-2000, 12:14 PM
I know nobody asked, but there are more options within a PULLDOWN.<ul> Single Choice Fields Multi Choice Fields Push Buttons Single Choice Subfiles Multi Choice Subfiles User defined [/list] PULLDOWNs are a bit easier to program than stand alone windows. If anyone has not been using them, this would be a good opportunity to start. Dave
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.