Page 1 of 2

How to build menu like old ACHOICE function?

Posted: Tue Feb 23, 2010 1:58 pm
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

Re: How to build menu like old ACHOICE function?

Posted: Tue Feb 23, 2010 2:54 pm
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

Re: How to build menu like old ACHOICE function?

Posted: Tue Feb 23, 2010 3:03 pm
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

Re: How to build menu like old ACHOICE function?

Posted: Tue Feb 23, 2010 6:42 pm
by mol
but, how to navigate with keyboard?
Marek

Re: How to build menu like old ACHOICE function?

Posted: Wed Feb 24, 2010 1:49 am
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.

Re: How to build menu like old ACHOICE function?

Posted: Wed Feb 24, 2010 6:27 am
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...

Re: How to build menu like old ACHOICE function?

Posted: Wed Feb 24, 2010 2:11 pm
by mol
I'm sure, Rathi has possibilities to build such a user component like achoice menu.

What do you think, Rathi?

Re: How to build menu like old ACHOICE function?

Posted: Wed Feb 24, 2010 7:12 pm
by jucar_es
adjunto una funcion que yo uso la cual puede adaptar facilmente,


espero le sea util

Re: How to build menu like old ACHOICE function?

Posted: Wed Feb 24, 2010 7:43 pm
by mol
Fine working!
Many thanks!
But still, it isn't what I'm want...

regards, Marek

Re: How to build menu like old ACHOICE function?

Posted: Thu Feb 25, 2010 11:15 am
by mol
I have a question to Roberto:
Is it possible to define listbox without scrollbar?