Page 1 of 1

Datagrid: empty Option Menu

Posted: Wed Nov 06, 2019 10:40 am
by Zax
Hello,

I'm trying to use an Option Menu in a Datagrid cell.
Populating is OK, changing cell value with Option Menu is OK... All is OK but the Menu always seems empty, even if the Datagrid's data is correct and it's menuHistory is correct.
grid.jpg
grid2.jpg
grid2.jpg (20.24 KiB) Viewed 2207 times
At this time, Option menu text is "a b c" for testing purpose.
Script:

Code: Select all

on FillInData pData
   lock messages // don't send "menuPick" msg
   set the menuHistory of button 1 of me to (lineOffset(pData, the text of button 1 of me)) 
   -- set the label of button 1 of me to pData
   unlock messages
end FillInData

on menuPick pItem
   SetDataOfIndex the dgIndex of me, the dgColumn of me, pItem
end menuPick
Project browser:
Capture d’écran 2019-11-06 à 10.39.38.jpg
Checkbox behavior at column 3 works fine.
Maybe I made stupid mistake but I don't understand why the Option Menu looks empty.

Thank you.

Re: Datagrid: empty Option Menu

Posted: Wed Nov 06, 2019 11:00 am
by bogs
If I had to guess (and that is exactly what I am doing here), then I would say it is because the grid isn't displaying the label of the option menu. I am sure there must be a way to do that, but someone else will chime in I'm sure to correct me if I'm wrong.

Re: Datagrid: empty Option Menu

Posted: Wed Nov 06, 2019 11:28 am
by Zax
bogs wrote:
Wed Nov 06, 2019 11:00 am
I would say it is because the grid isn't displaying the label of the option menu.
Great :)
I had to check "show name" in the Option Menu.
It works, thanks!