In Sample FixedContainer ,I attach a menu to the button (The Button is in the Container on the top of view,just like the Sample Menu2),
After click the button ,the menu popup up,but how can i move the menu while the view is scrolling down??just as the Buttons do?
Hello Joshua,
What about to use a Dropdown or Select controls instead a Menu one? Anyway, right now we have no "scroll" events, but we can use "pure" Javascript to attach some app's function to some possible "scroll" event of the app's view. Take a look a this article and please tell me if you have any further questions.
Use Dropdown,the popup menu still not follow with the Dropdown Button while view scrolling down
and to the article
you mean:Menu2.onscroll = function(){myScript};??
Hello Joshua,
Certainly something like the below (placed in the view's Show event) do not work as expected:
Can you provide here a little app sample sir? Maybe with a bit of CSS we can get the menu acting like you wanted.
in View1 showevent
And I create a Function in ABscript name 'scroll_set_popmenu_position'
This seems the fuction will be called while 'Scrolling',but the menu position is not right!
:| and =|
Hello Joshua,
I am not sure if attach an "scroll" event to the "window" can be good here. Anyway, can you see what "[ButtonTop]" and "[ButtonLeft]" store? When the menu is shown? When is hide? Honestly I can't figure out exactly what you wanted, I am sorry for that.
Can you please provide here a little app sample so we can take a look?
in fact ,all I want to say is that:
In Sample FixedContainer,if I popup a menu by click the button(or use Dropdown Button)
while the popup menu still visible ,
and I do 'MouseDown' action,the popumenu does not follow the button move downforward
Hello Joshua,
Thanks. Finally I think I got it. Please, loot at the below attached sample:
FixedContainer.ab
Press the first top button and you can see a Menu. Scroll down the app's view and now the Menu continues there. The "trick" is made by set the "position = fixed" to the Menu, as you can see in the sample's "Inline CSS" option. Hope this can help you in some way.
P.S. Anyway, consider to use an entire view for menus. Some menus can be implemented like that and for sure its a good way to do it, showing the "menu" view as a dialog or not.
Oh,this work! :)
I know the 'entire View for menus',but i want to try some different ways
and will this 'position = fixed' will work with Dropdown Button's menu too?
Hello Joshua,
Yes; apparently the same "trick" can be used with a DropDown button in the same scenario. Take a look at the below sample:
FixedMenu.ab
However, this time we set the "position = fixed" to certain CSS class... and maybe this can interfere in some others DropDown controls.
excellent!Thanks you very much!
Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.