Main Menu Setting

HMG Unicode versions 3.1.x related

Moderator: Rathinagiri

User avatar
bobgen
Posts: 7
Joined: Sun Apr 08, 2012 7:17 pm
DBs Used: DBF, SQLite
Location: Croatia

Main Menu Setting

Post by bobgen »

I have one question: how is possible to set drop side for main menu?
Now menu drop to left. I wish drop do the right.
On picture is actual situation.

Thanks in advance
MenuSet.jpg
MenuSet.jpg (18.2 KiB) Viewed 6798 times
franco
Posts: 816
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: Main Menu Setting

Post by franco »

I believe it is set by the size of the window the menu is in. If you move it to the left and make it bigger, the drops will be to the right.
Hope this helps ... Franco
All The Best,
Franco
Canada
User avatar
dragancesu
Posts: 920
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: Main Menu Setting

Post by dragancesu »

It's like ...\samples\controls\menu\menu_1

It works fine except when the program window is moved to the right that there is no place to display a submenu

Send your code
User avatar
bobgen
Posts: 7
Joined: Sun Apr 08, 2012 7:17 pm
DBs Used: DBF, SQLite
Location: Croatia

Re: Main Menu Setting

Post by bobgen »

That's right. If the window is set to the full screen or if the left edge of the window is on the left edge of the screen, then everything is fine.
However, this is not the case for standard windows apps.
My code is:

Code: Select all

#include <hmg.ch>
/**********************************************************
	Komentar funkcije
***********************************************************/
Function Main
REQUEST DBFCDX, DBFFPT
RDDSETDEFAULT( "DBFCDX" )
SET DATE GERMAN
SET CENTURY ON
DEFINE WINDOW Main ;
	AT 0,0 ;
	WIDTH 900 ;
	HEIGHT 700 ;
	TITLE 'DBF Test' ;
	MAIN
	DEFINE MAIN MENU
		POPUP 'File'
			ITEM 'Open' 		ACTION MsgInfo ('File:Open') 
			ITEM 'Save' 		ACTION MsgInfo ('File:Save')  
			ITEM 'Print' 		ACTION MsgInfo ('File:Print')  
			ITEM 'Save As...' 	ACTION MsgInfo ('File:Save As')
			ITEM 'HMG Version' 	ACTION MsgInfo (HMGVersion())
			SEPARATOR
			ITEM 'Exit' 		ACTION MsgInfo ('File:Exit')
		END POPUP
		POPUP 'Test' 
			ITEM 'Item 1' 		ACTION MsgInfo ('Item 1')
			ITEM 'Item 2' 		ACTION MsgInfo ('Item 2')
			POPUP 'Item 3' name test
				ITEM 'Item 3.1' 		ACTION MsgInfo ('Item 3.1') 
				ITEM 'Item 3.2' 		ACTION MsgInfo ('Item 3.2')
				POPUP 'Item 3.3'
					ITEM 'Item 3.3.1' 		ACTION MsgInfo ('Item 3.3.1')
					ITEM 'Item 3.3.2' 		ACTION MsgInfo ('Item 3.3.2')
					POPUP 'Item 3.3.3' 	
						ITEM 'Item 3.3.3.1' 		ACTION MsgInfo ('Item 3.3.3.1')
						ITEM 'Item 3.3.3.2' 		ACTION MsgInfo ('Item 3.3.3.2')
						ITEM 'Item 3.3.3.3' 		ACTION MsgInfo ('Item 3.3.3.3')
						ITEM 'Item 3.3.3.4' 		ACTION MsgInfo ('Item 3.3.3.4')
						ITEM 'Item 3.3.3.5' 		ACTION MsgInfo ('Item 3.3.3.5')
						ITEM 'Item 3.3.3.6' 		ACTION MsgInfo ('Item 3.3.3.6')  
					END POPUP
					ITEM 'Item 3.3.4' 		ACTION MsgInfo ('Item 3.3.4')
				END POPUP
			END POPUP
			ITEM 'Item 4' 		ACTION MsgInfo ('Item 4')
		END POPUP
		POPUP 'Help'
			ITEM 'About' 		ACTION MsgInfo ('Help:ABout')
		END POPUP
	END MENU
END WINDOW
Main.Center
Main.Activate
Return
User avatar
Anand
Posts: 595
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF

Re: Main Menu Setting

Post by Anand »

Hi bobgen,

I am getting this 'left-side" main menu effect in Win10, it was all 'right-side" in WinXp. The same code / exe shows different side menu drop in these Win version (may be also in others).

So I conclude that this is OS effect and HMG has nothing to do with it. Also can not force left or right for the drop menu, through codes.

Regards,

Anand
Regards,

Anand

Image
User avatar
bobgen
Posts: 7
Joined: Sun Apr 08, 2012 7:17 pm
DBs Used: DBF, SQLite
Location: Croatia

Re: Main Menu Setting

Post by bobgen »

I still think that this is a problem with HMG, not WIN 10. I use some other tools to develop WIN applications, but they work equally to all win versions.

Regards,
Bobgen
User avatar
Anand
Posts: 595
Joined: Tue May 24, 2016 4:36 pm
DBs Used: DBF

Re: Main Menu Setting

Post by Anand »

Well this indeed looks like Win10 issue, which seems to be fixed in latest update !

Below is the sample screen from c:\hmg.3.4.3\SAMPLES\Controls\Menu\MENU_1\
2017-06-28_145724.png
2017-06-28_145724.png (11.17 KiB) Viewed 6610 times
This was showing left-side drop menu earlier. But today it is showing correct i.e. right-side drop menu. Also my other application developed in Xbase++ are showing right-side drop menu.

My current Win10 version is as below,
2017-06-28_145724.png
2017-06-28_145724.png (11.17 KiB) Viewed 6610 times
I can only confirm that the same code is used and same exe is showing different than earlier, i.e. now in correct way.

Regards,

Anand

EDIT: Screen shot attachments are showing incorrect position in this message , somehow.
Attachments
2017-06-28_145523.png
2017-06-28_145523.png (600.02 KiB) Viewed 6610 times
Regards,

Anand

Image
User avatar
bobgen
Posts: 7
Joined: Sun Apr 08, 2012 7:17 pm
DBs Used: DBF, SQLite
Location: Croatia

Re: Main Menu Setting

Post by bobgen »

Something strange. My installation and demo:

Figure 1 is a win 10 setting.
a 2017-06-28_12-48-30.jpg
a 2017-06-28_12-48-30.jpg (32.68 KiB) Viewed 6600 times
Figure 2 menu_1 from the Sample Folder.
b 2017-06-28_12-52-07.jpg
b 2017-06-28_12-52-07.jpg (110.87 KiB) Viewed 6600 times
Figure 3 when I move the application window to the left edge.
c 2017-06-28_12-55-57.jpg
c 2017-06-28_12-55-57.jpg (92.46 KiB) Viewed 6600 times
Best Regards.
edk
Posts: 909
Joined: Thu Oct 16, 2014 11:35 am
Location: Poland

Re: Main Menu Setting

Post by edk »

I have the same OS build as bobgen and on my computer the popup menu is displayed correctly.
If there is not enough space to display the next popup menu on the right side, it is displayed on the left side.
test4.png
test4.png (877.25 KiB) Viewed 6593 times
test1.png
test1.png (869.3 KiB) Viewed 6593 times
test3.png
test3.png (924.74 KiB) Viewed 6593 times
test2.png
test2.png (936.05 KiB) Viewed 6593 times
Post Reply