Operating System - OpenVMS
1748227 Members
4383 Online
108759 Solutions
New Discussion юеВ

Re: Is it possible to wrap horizontal Menu using SMG$ routine?

 
yiyid416
New Member

Is it possible to wrap horizontal Menu using SMG$ routine?

Hi.. I am trying to figure out if I can wrap horizontal menu using SMG$ routines.
I understand that SMG$Create_Menu uses a flag SMG$M_WRAP_MENU to use up and down arrow from the keyboard to wrap text in multiple rows of menu selection. I am trying to find out is there any way to do the samething for right and left arrows to wrap a horizontal menu.
5 REPLIES 5
John Gillings
Honored Contributor

Re: Is it possible to wrap horizontal Menu using SMG$ routine?

Sorry, looks like SMG$K_WRAP_MENU only wraps top to bottom. As the docs say

"The up arrow and down arrow keys cause the menu to wrap when the cursor is on the first or last rows of the menu. "

Experiment confirms that SMG$K_WRAP_MENU does not affect the behaviour of a horizontal menu.

Note that you can always implement a wrapping horizontal menu yourself - you just have to write more code!
A crucible of informative mistakes
yiyid416
New Member

Re: Is it possible to wrap horizontal Menu using SMG$ routine?

well.. that stinks.. I was hoping there will be routines made for wraping horizontal menus.

any tips?? sample code to help me out here?
Paul Beaudoin
Regular Advisor

Re: Is it possible to wrap horizontal Menu using SMG$ routine?

I may not understand the question but here goes.... If you mean by wrapping that the horizontal menu continues on the next line when it exceeds the line length then you can use SMG$K_BLOCK as a paramater to creating the menu. This does what it says - puts the items as a block across multiple lines on the screen. Sample: (sorry - it is in macro)- Watch the wrapping here:
132$:PUSHAL REVERSE
PUSHAL W3 options ...
CLRL -(SP)
PUSHAL FORMAT
PUSHAL BLOCK
PUSHAL DV_DCS
PUSHAL VD_DISP
CALLS #7,G^SMG$CREATE_MENU
BSBW ERROR_CHK
PUSHAL CHOICE
PUSHAL VD_DISP
PUSHAL KB_BOARD
CALLS #3,G^SMG$SELECT_FROM_MENU

Where:
FORMAT: .LONG SMG$M_FIXED_FORMAT
BLOCK: .LONG SMG$K_BLOCK
DV_DCS: .WORD 17 ; size of element
REVERSE: .LONG SMG$M_REVERSE
W3: .LONG 3


Hope this helps

Regards

Paul



yiyid416
New Member

Re: Is it possible to wrap horizontal Menu using SMG$ routine?

Thanks for the respond. But my question was not in regards of wrapping to the next line on a horizontal menu. It was about using the left and right arrow keys to toggle the menu. when you are on the last item of the menu, and if you hit right arrow again, it will go back to the first item on the list.

Paul Beaudoin
Regular Advisor

Re: Is it possible to wrap horizontal Menu using SMG$ routine?

Ahh - OK. I wasn't sure I had the right question and sorry - don't have an answer (if indeed there is one) to the 'real' question.

Regards

Paul