Page 1 of 1

Option Menu and modal pickwheel

Posted: Thu Apr 21, 2011 5:51 pm
by brentj84062
I'm overall very impressed with the iOS kit. Something I wasn't expecting when I first installed and started working with it is the Motif theme, which does change how I have to approach and design my application. Not necessarily a bad thing, but I'm stuck on one detail:

I have an option menu that brings up the pickwheel with no problems. But, there is this pesky box with the option menu that I can't seem to get rid of. See the attachment to see what it looks like.

I've messed with blending settings and a few other things, but I can't seem to get rid of this. I would just set the color to match the background it's on, but that background is an image. Any thoughts? Should I just make a custom control and bring up the modal pick wheel by hand?

Re: Option Menu and modal pickwheel

Posted: Thu Apr 21, 2011 7:47 pm
by Dixie
Hi..

I too have been looking at the modal pick wheel. I have used this script in the iphone simulator and everything runs fine, the pick wheel appears with all 26 items inside it. However, if I use the same script in the iPad simulator, only 7 items appear in the pop-over.

Code: Select all

on mouseUp
   put "Alpha,Bravo,Charlie,Delta,Echo,Foxtrot,Golf,Hotel,India,Juliet,Kilo,Lima,November," & \
   "Oscar,Papa,Quebec,Roger,Sierra,Tango,Uniform,Victor,Whisky,Xray,Yankee,Zulu" into theList
   
   repeat with count = 1 to the number of items of theList
      put item count of theList & cr after pickList
   end repeat
   
   delete the last char of pickList
   
   iphonePick pickList,3
end mouseUp
Anyone else seeing this ?

Dixie

Re: Option Menu and modal pickwheel

Posted: Thu Apr 21, 2011 8:00 pm
by bn
Hi Dixie,

your script works for me in the Simulator. Livecode 4.6.

I just have to scroll and I see all the entries down to Zulu.

Kind regards

Bernd

Re: Option Menu and modal pickwheel

Posted: Thu Apr 21, 2011 8:07 pm
by Dixie
Hi Bernd...

From the release notes...
On the iPhone, a standard Action Sheet pops up containing the standard pick-wheel user interface element.

On the iPad, a standard pop-over is presented with a list to choose from. The currently selected entry being marked with a check. In this case, if initialIndex is 0, then no item is checked when displayed.

Bernd... It is fine when the list appears in the standard pick-wheel user interface, it is when running as if on an iPad that I have the problem... as only 'Alpha' through to 'Golf' appear in the pop-over.

be well

Dixie

Re: Option Menu and modal pickwheel

Posted: Thu Apr 21, 2011 8:28 pm
by bn
Hi Dixie,
as only 'Alpha' through to 'Golf' appear in the pop-over.
that is what I am seeing in the Simulator for the iPad also, but if you scroll the list that pops up you see the rest of the entries. Seems like 7 items is the max that is displayed, the rest is scrolling...

if you give it a 10 as preselected it does not scroll to the 10th line, the 10th line is marked but you have to scroll there. This is the situation as of Livecode 4.6, I have a hunch that that will change soon...

What version of Livecode are you using?

Kind regards

Bernd

Re: Option Menu and modal pickwheel

Posted: Thu Apr 21, 2011 8:41 pm
by Dixie
Bernd...

I've got a red face... I didn't even try to scroll the list in the pop-over... I just stared at it :oops:

Dixie

Re: Option Menu and modal pickwheel

Posted: Thu Apr 21, 2011 9:05 pm
by bn
Hi brentj,

the easiest way is probably to do it as Dixie does it in his script. You could put your list into a global variable and use that for the options.

You could also use an options menu button if you set its icon to an image of your choice and the showname to false and adjust width and height to the size of the image then that is what you will see in the simulator. I am not shure wether you want the button to be visible or not.

Kind regards

Bernd

Re: Option Menu and modal pickwheel

Posted: Thu Apr 28, 2011 9:27 pm
by brentj84062
Thanks for the feedback, the script works just fine of course, I just wanted to see if using a UI widget would save me a few lines of code :P I'm lazy that way.

Thanks 'all, that helps a lot.

Re: Option Menu and modal pickwheel

Posted: Sun May 01, 2011 3:53 pm
by observ3
I'm cheating a little on this...
I made option menus, then pushed them off to the side so they are not visible. The user then clicks on a button, which sends a "click" to the menu. After the user makes a selection the label of the button is updated.
Cheating? Yes.
Easy? Yes.