New topic: Can I set PopupMenu text from database field/column?
<http://forums.realsoftware.com/viewtopic.php?t=45876> Page 1 of 1 [ 3 posts ] Previous topic | Next topic Author Message LazyGator Post subject: Can I set PopupMenu text from database field/column?Posted: Mon Nov 12, 2012 4:03 pm Joined: Mon Mar 15, 2010 2:35 pm Posts: 50 Location: Central Illinois I have an application where I provide an edit form for a MySQL database record. I'd like to use a PopupMenu for some of the editable fields so that users can pick from a list versus have to manually type in data (e.g., office location). Is it possible to set the Text property of the PopupMenu to the text value currently in the database field/column - I'm aware that I cannot set the Text property directly? A ComboBox would be ideal if I could block the user from being able to enter in text. Thanks! _________________ "He who is afraid to ask is ashamed of learning." --Danish proverb Real Studio Enterprise 2012 r1.2 OS X 10.8.2 Mountain Lion MacBook Pro - Mid 2009 http://www.LazyGatorWeb.com Top Akiland Post subject: Re: Can I set PopupMenu text from database field/column?Posted: Mon Nov 12, 2012 4:06 pm Joined: Tue Jan 04, 2011 3:02 am Posts: 1000 Location: Jönköping, Sweden Sure Loop through the items in the PopupMenu and see if it matches what's in the database field using StrComp Or, use a Select Case and have it check against what's in the database and then select the correct row in the PopupMenu. _________________ http://www.linkedin.com/in/albinkiland Dev. iMac 27" + 2x22" LG (2.8GHz Intel Core i7, 12GB RAM, 120GB SSD) OS X 10.8 REAL.Studio Web Edition 2011r3 Top LazyGator Post subject: Re: Can I set PopupMenu text from database field/column?Posted: Mon Nov 12, 2012 4:32 pm Joined: Mon Mar 15, 2010 2:35 pm Posts: 50 Location: Central Illinois Akiland, Thanks for the suggestions. I appreciate your assistance. bb _________________ "He who is afraid to ask is ashamed of learning." --Danish proverb Real Studio Enterprise 2012 r1.2 OS X 10.8.2 Mountain Lion MacBook Pro - Mid 2009 http://www.LazyGatorWeb.com Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 3 posts ]
-- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
