Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
gpatton
Posts: 193
Registered: ‎12-29-2010
My Device: Bold 9900
My Carrier: Rogers

Re: PopUp Window

Hey,

 

I didn't know it had to be approved by moderators. I guess it makes sense.

 

So my list has a bunch of items in the list. You can copy this code as well and run it: 

 

 

private function showPopup():void
		{
			this.currentView = "backgroundOptions";
			
			backgroundPopUp = new PopupList();
			backgroundPopUp.title = "Change Background";
			backgroundPopUp.items = ['Black', 'Green', 'Red', 'Blue', 'Orange', 'White', 'Slow Lines', 'Abstract', 'Lines', 'Aurora'];
			backgroundPopUp.addButton("OK");
			backgroundPopUp.addButton("Cancel");
			backgroundPopUp.dialogSize = DialogSize.SIZE_TALL;
			backgroundPopUp.addEventListener(Event.SELECT, backgroundPopUpSelection); 
			backgroundPopUp.show(IowWindow.getAirWindow().group);       
		} 

 

When and if you run this,  you'll notice that the "g" of the "Orange" in the list is cut off from the bottom on the list. If you run the code you'll notice.

 

Here is the eventListener so you don't have to re-write the whole thing:

 

 

private function backgroundPopUpSelection(e:Event):void{
			// Hit the "OK" button.
			if (e.target.selectedIndex == 0) {
				var index:int = new int();
				index = e.target.selectedIndices;
			}
                        
                        if (e.target.selectedIndex == 1) {
				// exit
			}
		}

 

Let me know if you need anything else?

Thanks.

 

Btw, can I private message you the image, will it show up?

 

GP

 

 

Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: PopUp Window

hey,

 

the image showed up about twenty minutes ago or so. been at it since then lol. havent found away to increase the size. see the way that dialogs work is different from the rest of actionscript. its not an object you can manipulate and work around like most of the classes in action script unfortunately. so the pop up list is using hte list object but behind hte scenes and you cant change the way it looks. if we could we would simply change the rowheight of the list and it'd be ok. but unfortunately thats not possible so far.

 

the funny thing is that on the API description page the "g" on "cottage" shows up fine. at this point i think we can chock this up as a bug that needs ot be fixed or at least allow us a way to manipulate the inner list of the pop up list. so right now your best bet is going to be to write it all in capital letters and it shouldnt get cut off (dunno how bad / good that'll look). sorry i couldnt be of any help in this regard lol. if i do come up with a workaround though i'll let you know asap. good luck with everything else!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Developer
gpatton
Posts: 193
Registered: ‎12-29-2010
My Device: Bold 9900
My Carrier: Rogers

Re: PopUp Window

[ Edited ]

Hey JRab,

 

Thanks for all the help!

Really appreciate it.

 

I think I'll have to change the "Orange" to "Mandarin" and be all artsy with it :smileyhappy:  haha

 

Anyways, thanks for your help man!

 

GP

Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: PopUp Window

haha! thats pretty clever workaround... well played! :smileyvery-happy:

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Developer
ChernyshovYuriy
Posts: 116
Registered: ‎11-18-2010
My Device: BlackBerry PlayBook
My Carrier: null

Re: PopUp Window

Will it be a possibility to use custom item renderer for an item in list ?

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: PopUp Window

See my response to your similar question regarding PopuList renderers.  Just a couple of days before I can release it.

Please use plain text.