Building a dynamic menu with dialog and a database

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
EnderFFX
Pro Scripter
Posts: 92
Joined: Mon Mar 08, 2004 6:17 am

Building a dynamic menu with dialog and a database

Post by EnderFFX » Thu Jun 15, 2006 1:46 pm

I have no problems pulling information from an Access database. I have a lot of problems inserting data into a dialog box. Is this possible?

Let me give a real simple example of what I want to do.

I have an array of elements, each element has a name. I want to put each of those elements into a dialog box, and make each of those elements a button.

Is there code out there for doing this?

Is it possible to run a loop within the Dialog> EndDialog> statements?

I've scrapped my code a couple of times and I'm going to try again!

Any suggestions would be great.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Jun 15, 2006 2:56 pm

I can't think of a way to do that with buttons off the top of my head, but can I ask a silly question - why can't you use a combobox or listbox instead? This can be dynamically filled with your array. The user just selects the item rather then presses a button .... ?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

EnderFFX
Pro Scripter
Posts: 92
Joined: Mon Mar 08, 2004 6:17 am

Post by EnderFFX » Thu Jun 15, 2006 3:20 pm

I'll give you a silly response, I didn't think of it. That makes sense, I'll have to try it and see what I can come up with. Thank you!
mtettmar wrote:I can't think of a way to do that with buttons off the top of my head, but can I ask a silly question - why can't you use a combobox or listbox instead? This can be dynamically filled with your array. The user just selects the item rather then presses a button .... ?

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Jun 15, 2006 5:27 pm

Hello,
A combo or listbox might be the best solution for this application, they are very handy. But I wanted to point out that dynamic dialog boxes can be built by writing and calling a script from within a script. I posted an example using buttons for user mydave back in February of this year.
Later,
Dick

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts