How to build menu like old ACHOICE function?

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

How to build menu like old ACHOICE function?

Post by mol »

Hi guys!
I want to place on the form menu, which should look and work like old ACHOICE function.

I've tried to use grid or listbox::

Code: Select all

	aMenuMain := {;
		{"Opcja 1"} , ;
		{"Opcja 2"} , ;
		{"Opcja 3"} ,;
		{"Opcja 4"} ,;
		{"Opcja 5"} }
		
	aMenuList := {"Opcja1","Opcja 2", "Opcja 3", "Opcja4", "Opcja 5", "Opcja 6", "Opcja 7", "Opcja 8", "Opcja 9", "Opcja 10", "Opcja 11" }

		@ 10,10 GRID Grid_1 ;
			WIDTH 400 ;
			HEIGHT 20*(len(aMenuMain)+1) ;
			HEADERS {'MENU MAIN'};
			ITEMS aMenuMain ;
			WIDTHS {400};
			COLUMNCONTROLS { aCtrl_1 } ;
			On DblClick	WyborOpcji() 

		@ 10,500 LISTBOX L_1 ;
			WIDTH 200 ;
			HEIGHT 20*(len(aMenuList)) ;		
			ITEMS aMenuList;
			FONT "ARIAL CE" SIZE 11;
			On DblClick WyborZListy()
It looks and works similar.
But - at right side scrollbar always appears - I don't want it.

Has anybody any idea (or working code) how to realise it?

Best regards, Marek
User avatar
luisvasquezcl
Posts: 1258
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: How to build menu like old ACHOICE function?

Post by luisvasquezcl »

Hi Mol,
You can make a list of labels to display the menu.
I can not imagine anything better. :?
best regards,
luis vasquez
User avatar
luisvasquezcl
Posts: 1258
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: How to build menu like old ACHOICE function?

Post by luisvasquezcl »

Hi Mol,
some time ago I did a test with a menu label + picture ... I did not like much, but they are testing to do.
best regards
luis vasquez
Attachments
imagen.JPG
imagen.JPG (13.61 KiB) Viewed 5077 times
User avatar
luisvasquezcl
Posts: 1258
Joined: Thu Jul 31, 2008 3:23 am
Location: Chile
Contact:

Re: How to build menu like old ACHOICE function?

Post by luisvasquezcl »

Good question marek .... :?:
I made east example to prove visually like quedaria and without worrying to me more about another thing than that. in order to execute the event onclick of label podria to be used ON KEY… it's only one idea.
best regards,
luis vasquez.
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: How to build menu like old ACHOICE function?

Post by mol »

It will be difficult to realise with ON KEY, because I'm using .dbf file to store menu tree. And all menus are builded during runtime.
Most of all, I had arrow keys on my mind...
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: How to build menu like old ACHOICE function?

Post by mol »

I'm sure, Rathi has possibilities to build such a user component like achoice menu.

What do you think, Rathi?
jucar_es
Posts: 82
Joined: Thu Nov 13, 2008 11:12 pm

Re: How to build menu like old ACHOICE function?

Post by jucar_es »

adjunto una funcion que yo uso la cual puede adaptar facilmente,


espero le sea util
Attachments
P_CHOICE.zip
(774 Bytes) Downloaded 372 times
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: How to build menu like old ACHOICE function?

Post by mol »

Fine working!
Many thanks!
But still, it isn't what I'm want...

regards, Marek
User avatar
mol
Posts: 3718
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: How to build menu like old ACHOICE function?

Post by mol »

I have a question to Roberto:
Is it possible to define listbox without scrollbar?
Post Reply