Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Aug 20, 2019 1:07 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Turning a TextField into a PopupMenu
PostPosted: Mon Jul 30, 2012 10:19 am 
Offline
User avatar

Joined: Wed Feb 01, 2012 3:06 pm
Posts: 68
I have an application where after the user enters some information into a TextField, the program uses the information in the TextField to retrieve information from a database. The information retrieved from the database is used to auto-fill some other TextFields in the display form.

Think of it as like a customer order form where the user enters a customer's last name and the program retrieves other customer data.

Sometimes the database returns more than one record in the retrieval and I'd like to give the user a list of the "names" returned and let them select which they want.

I've thought of having two controls in the same spot - a TextField and a PopupMenu - and having the software switch which is visible and active based on the state of the processing.

Is there a better or more elegant method ?

_________________
Ron Bower
Ellicott City, MD


Top
 Profile  
Reply with quote  
 Post subject: Re: Turning a TextField into a PopupMenu
PostPosted: Mon Jul 30, 2012 11:07 am 
Offline

Joined: Wed May 20, 2009 4:43 pm
Posts: 958
RonBower wrote:
I have an application where after the user enters some information into a TextField, the program uses the information in the TextField to retrieve information from a database. The information retrieved from the database is used to auto-fill some other TextFields in the display form.

Think of it as like a customer order form where the user enters a customer's last name and the program retrieves other customer data.

Sometimes the database returns more than one record in the retrieval and I'd like to give the user a list of the "names" returned and let them select which they want.

I've thought of having two controls in the same spot - a TextField and a PopupMenu - and having the software switch which is visible and active based on the state of the processing.

Is there a better or more elegant method ?

Use a ComboBox?

_________________
RB 2009r4 Windows XP


Top
 Profile  
Reply with quote  
 Post subject: Re: Turning a TextField into a PopupMenu
PostPosted: Mon Jul 30, 2012 11:42 am 
Offline
User avatar

Joined: Wed Feb 01, 2012 3:06 pm
Posts: 68
ComboBox ... Thanks !!!

That certainly seems to be exactly what I need - I'll start seeing if I can implement it.

_________________
Ron Bower
Ellicott City, MD


Top
 Profile  
Reply with quote  
 Post subject: Re: Turning a TextField into a PopupMenu
PostPosted: Mon Jul 30, 2012 12:02 pm 
Offline

Joined: Wed May 20, 2009 4:43 pm
Posts: 958
RonBower wrote:
ComboBox ... Thanks !!!

That certainly seems to be exactly what I need - I'll start seeing if I can implement it.

One thing to note if your application is cross platform - On Mac, if there are no items in the list, the dropdown will not appear, but on Windows, if there are no items, it will show a large empty drop with nothing to select, so you might want to add an empty row until there is a value entered on Windows platform.

_________________
RB 2009r4 Windows XP


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group