Page 1 of 1

VLWeb PRIM_MD.DropDown Click Event

Posted: Wed Apr 17, 2019 2:49 am
by jyoung
Anyone know how to "fake" a Click event with PRIM_MD.DropDown.

I have a dropdown that has a few options.

Code: Select all

#STD_TEXT := 'This Week'
#STD_TEXTS := 'THIS_WEEK'
#DropDownList.Items.Add value(#STD_TEXTS) caption(#STD_TEXT)

#STD_TEXT := 'Last Week'
#STD_TEXTS := 'LAST_WEEK'
#DropDownList.Items.Add value(#STD_TEXTS) caption(#STD_TEXT)

#STD_TEXT := 'Next Week'
#STD_TEXTS := 'NEXT_WEEK'
#DropDownList.Items.Add value(#STD_TEXTS) caption(#STD_TEXT)

#STD_TEXT := 'Period'
#STD_TEXTS := 'PERIOD'
#DropDownList.Items.Add value(#STD_TEXTS) caption(#STD_TEXT)
The problem arise when "Period" is selected, as this invokes a rather complex period lookup.
If the user selects "Period" then needs to change the period, they cannot, without first changing the dropdown's value.

The other values are not an issue as they can easily be calculated.

It only exposes a "Changed" event whereas I really need a "Click" event.

I was handling this with the old style PRIM_List.Dropdown control, but have been moving the UI to the Material Design control set.

Thanks,
Joe

Re: VLWeb PRIM_MD.DropDown Click Event

Posted: Fri Apr 19, 2019 6:21 am
by jyoung
Try as I may, I could not find an alternative control or display mechanic to handle this that I liked.

So I punted, and made my own. 8-)

With a combination of PRIM_MD.Edit, PRIM_MD.List and the regular PRIM_PPNL popup, I made it work just like a standard PRIM_MD.DropDown.

The only "weird" thing to figure out was the placement and height of the popup, and that just took a bit of experimenting with different values to get something that looked nice.