No Paste in ComboBox ?

I am actually populating a SQLite Database file and the “Title” field is located in a ComboBox.

The Tile field usually hold the street name, so I wanted to Copy it from the Address field into the ComboBox.

First of all, in Xojo 2015r1, no MenuBar is set by default into new windows :frowning:

So I set it, then I wanted to restart… and no Paste is done.

So, I commented the code I had in ComboBox1.Open, run and no Paste too.

The only other event is Open.

Is it not permitted to Paste text (nor Drag and drop) in ComboBox ?

PS: apparently, TextFields does not allow (by default ?) Drag and drop Text…

You have to set the Me.AcceptTextDrop for the control to accept dropped text (I do this in the open event).

To drop onto the ComboBox control, it must be active (i.e.: dropped down).

Thanks Tim.

That is a difference with TextAreas where Drop is automagic…

After lunch ideas are great: I subclassed the ComboBox and add a Paste Event. As Simple as that.

But I have to add more code (set a Paste Property to avoid my code in the Change event to be executed when I paste text there).

I also noticed that I have to update my RecordSet, else I cannot make changes to the newly added Records (or I have to close the window after each Reord addition… :frowning: and re-open it to get the newly added Record !)

Isn’t that called debugging ? :wink:

Strange - I posted a reply, it was there and then it was gone …

That’s what I do - set a flag in the DropObject code and then watch for it in the Change event.

Remember Tim to not put emoji in this text (forum): the software does not like it and remove all the text starting from the emoji 'till the end of the reply :frowning:

Yes, that’s the idea.

Ideas (and usually good ideas) comes easilly when doing something (from) different (to far different) things…

I add things to this project from time to time, usually when an idea comes for it, or when I want to go complete it a bit (small or great steps).
I usually stop when I ncounter a bug (and no idea to continue) or after I am satisfied with a good addition (so I stop in a good fashion // I am happy by the addition).

I have time with this project.