Page 1 of 1

HTML in pulldown menus?

Posted: Wed Jun 12, 2013 7:06 pm
by danielrr
Is it possible to use html formatting for the options of the pulldown menus in buttons (as you can, for instance) in dialog windows?

Re: HTML in pulldown menus?

Posted: Thu Jun 13, 2013 1:09 am
by Mark
Hi,

You can create a stack panel instead of a default menu. Use transparent buttons over fields and fill the fields with HTML.

Kind regards,

Mark

Re: HTML in pulldown menus?

Posted: Thu Jun 13, 2013 6:27 pm
by danielrr
OK, I can live with that, but would't it be easier to create a field than behaver more or less like a pulldown menu?

a call like this one

set the HTMLText of field "listoid" to container
set the visible of field "listoid" to true
get the mouseloc
add 100 to item 1 of it
set the location of field "listoid" to it

is more or less ok, and something like this on the field's script does most of the stuff

on mouseUp
select the clickline
end mouseUp

on mouseDoubleUp
get the value of the clickline
set visible of me to false
doWhateverItTakes it
end mouseDoubleUp

on mouseleave
set visible of me to false
end mouseleave

But this works only it the field has a vertical scrollbar, which is very unlike a pulldown menu. To simulate the real thing and dispense with the scrollbar, some more scripting would be necessary. Before I start implementing one such thing Did anybody else ever wrote such a field-as-pulldown-menu thing and is willing to share with the world?

s

Re: HTML in pulldown menus?

Posted: Fri Jun 14, 2013 10:14 am
by Mark
Hi s,

I don't remember exactly why, as I tried it a very long time ago, but I think that stack panels work best with buttons.

Why do you set the visible to false after a mouseLeave? Perhaps that is the reason why I recommend buttons, together with having to have a scrollbar :wink:

I'd put a little more effort into building the interface and create a stack panel with separate fields for each item and transparent buttons.

Kind regards,

Mark