featurelist.orgfeaturelist.org
 
U
D
9 points - posted 3527 days ago by freddukes - status: Active - 3 comments watch embed this
A simple addline in easymenu that doesn't start with an index number so we can add comments etc... an example:

mypopup = popuplib.easymenu('mypopup','_popup_choice', mymethod)
mypopup.settitle('Eat Food')
mypopup.addoption('apples','Eat Apples')
mypopup.addline('Eating apples makes you strong and healthy')
mypopup.addoption('chocolate','Eat Chocolate')
mypopup.addline('Chocolate is bad for you!')

Eat Food
--------------------
1. Eat Apples
Eating apples makes you strong and health
2. Eat Chocolate
Chocolate is bad for you
--------------------
0. Cancel


-freddukes

freddukes posted on 2008-03-23 21:11:51
That didn't look so good... Hmmm... What I was trying to show was that addline will just add a normal line in anywhere. If you code it after an addoption, it'll appear after, before the option, it'll appear before the option in the popup.

-freddukes

Mattie posted on 2008-03-24 16:24:25
I cleaned it up a bit. it used the Markdown syntax so you just triggered some of that in your text.

freddukes posted on 2008-03-25 00:11:10
Thanks mattie, it looks great