Page 1 of 1

Combo Box Delete Line

Posted: Wed Jun 09, 2010 5:25 pm
by xfratboy
I'm trying to figure out how I could implement some sort of delete button within the text of an Option Menu button or Combo button. Any ideas?

ComboBox-Delete.jpg
ComboBox-Delete.jpg (7.95 KiB) Viewed 5057 times

The big picture:
I'm trying to use an Option button to allow user to reference image files on their computer (jpg, gif, etc). Once uploaded the combo box is updated with the new file name. If the delete icon is selected (to the right of the image) then basically the reference is removed; e.g. the line is removed. However, this behavior is not a feature of the regular Option Menu button or Combo button. So, I'm guessing I have to build a menu out of stack. Anyone tracking with me?

Thanks,

B.J.

Re: Combo Box Delete Line

Posted: Wed Jun 09, 2010 7:25 pm
by dunbarx
I suspect that it would be far easier to build a pseudo combo box than to try to force a standard one to do what you require. Some controls just cannot be stretched forever. As usual, I could be wrong.

The good news is there must be a million other ways to do it. I might create an array of checkboxes that are aligned with and mapped to your pop-up list. The lines in the list that are "checked" can be stored in a custom property and the hilites of the button array can be set accordingly.

Or something completely different.

Craig Newman

Re: Combo Box Delete Line

Posted: Wed Jun 09, 2010 8:57 pm
by xfratboy
Got time for a quick example? I'm kinda new to all this. Thanks.

Re: Combo Box Delete Line

Posted: Thu Jun 10, 2010 8:07 pm
by dunbarx
I made a simple stack that at least should give you a head start. I cannot seem to attach it, however. If you send me an email address, I will forward it.

Clicking on the "upload" button loads some data. Clicking on any of the checkboxes deletes the line in the field and also the button.

The number of buttons, the number of lines, where you get your data, etc., all are unaddressed. I don't know if the display field should pop up and disappear. Check it out.

Craig Newman

Re: Combo Box Delete Line

Posted: Thu Jun 10, 2010 9:03 pm
by bn
Craig,

if you zip the stack it will upload.

regards
Bernd

Re: Combo Box Delete Line

Posted: Thu Jun 10, 2010 9:39 pm
by dunbarx
Love our community.

Attached. Again, the number of checkboxes can be managed according to the number of lines in the display field. The field can pop up and disappear with a little extra coaxing. You may want to add a delay to the line that gets deleted, so you can actually see the checkMark, or even an alert making sure you really do.

Re: Combo Box Delete Line

Posted: Tue Jun 15, 2010 8:29 pm
by xfratboy
Sorry so long in replying. Thanks for the tips. What I ended up doing was just making a new stack pop-up in response to an specific option being selected. So, when I click on the menu item "Upload custom image" it just opens a new stack. Not as elegant as I'd like it to be but I was just trying to make something do more than it is was designed to do. With a stack set as modal I was able to add a few more bells and whistles. A few extra clicks but I'll get over it.