Page 1 of 2
Main Menu Setting
Posted: Thu Jun 22, 2017 4:32 pm
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 (18.2 KiB) Viewed 7382 times
Re: Main Menu Setting
Posted: Thu Jun 22, 2017 5:46 pm
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
Re: Main Menu Setting
Posted: Thu Jun 22, 2017 9:14 pm
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
Re: Main Menu Setting
Posted: Thu Jun 22, 2017 9:36 pm
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
Re: Main Menu Setting
Posted: Fri Jun 23, 2017 8:53 am
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
Re: Main Menu Setting
Posted: Tue Jun 27, 2017 11:26 pm
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
Re: Main Menu Setting
Posted: Wed Jun 28, 2017 9:56 am
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 (11.17 KiB) Viewed 7194 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 (11.17 KiB) Viewed 7194 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.
Re: Main Menu Setting
Posted: Wed Jun 28, 2017 11:05 am
by bobgen
Something strange. My installation and demo:
Figure 1 is a win 10 setting.

- a 2017-06-28_12-48-30.jpg (32.68 KiB) Viewed 7184 times
Figure 2 menu_1 from the Sample Folder.

- b 2017-06-28_12-52-07.jpg (110.87 KiB) Viewed 7184 times
Figure 3 when I move the application window to the left edge.

- c 2017-06-28_12-55-57.jpg (92.46 KiB) Viewed 7184 times
Best Regards.
Re: Main Menu Setting
Posted: Wed Jun 28, 2017 11:50 am
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 (877.25 KiB) Viewed 7177 times

- test1.png (869.3 KiB) Viewed 7177 times

- test3.png (924.74 KiB) Viewed 7177 times

- test2.png (936.05 KiB) Viewed 7177 times
Re: Main Menu Setting
Posted: Mon Jul 03, 2017 5:20 pm
by KDJ