#1 2017-07-01 03:08:45

reg4app
Member
Registered: 2016-05-16
Posts: 147

How can I change a Dropdown button's Items with code?

I want to change the Dropdown button's Items in coding
or
disabled some items ,enable some items......


Joshua.Y

Offline

#2 2017-07-01 05:10:24

reg4app
Member
Registered: 2016-05-16
Posts: 147

Re: How can I change a Dropdown button's Items with code?

I figure out one way

ArrayClear "[dropButton.Items]"
ArrayPush "[dropButton.Items]" "menu1"
ArrayPush "[dropButton.Items]" "menu2"

still do not know how to disable menuitem


Joshua.Y

Offline

#3 2017-07-01 09:10:20

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,659
Website

Re: How can I change a Dropdown button's Items with code?

Hello Joshua,

The Dropdown menu's items are feeded by an Array variable, so we can play with that Array variable in the same way than others. Unfortunatelly, due to how the dropdown is draw, we can't disabled menu's items, but we can place items than appear like disabled one with a little of CSS. Is our duty to get ready for these possible "disabled" items' clicks. Look at this sample: MyApp.zip

ZpNZ3Gc.gif

Online

#4 2017-07-01 10:44:53

reg4app
Member
Registered: 2016-05-16
Posts: 147

Re: How can I change a Dropdown button's Items with code?

OK,That will work
lol


Joshua.Y

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.