Make a form that allows user to drag and drop in an image

Hi :slight_smile:
I think the Documentation Team would be really glad to have you on their team if you fancy getting involved in documentation covering more diverse issues.

I agree that Drew is a star who often "goes the extra mile".  Could the form be added as a Template or Extension or something somewhere that wont get lost in the mists of time?
Regards from
Tom :slight_smile:

Hi :slight_smile:
I think the Documentation Team would be really glad to have you on
their team if you fancy getting involved in documentation covering more
diverse issues.

I agree that Drew is a star who often "goes the extra mile". Could the
form be added as a Template or Extension or something somewhere that
wont get lost in the mists of time?
Regards from
Tom :slight_smile:

It looks like something to be put in the advanced uses of Base chapters
for the Base Guide. This is why I have copied the important messages in
this thread in a separate folder for Base issues.

--Dan

Hi Drew,

It looks amazing now, and the functionality is great. I am especially glad
that it will work in Linux, Mac, and Windows!

Were you going to write an explanation for the code, or just the form?
Either way, if you can start a draft, I can help word smith it (probably by
asking you questions about it).

I think this is so useful, perhaps it can be integrated into the standard
LibreOffice Base macro set???

Not likely - it's too specific to a particular use case.

Ok - so I put a little time into this today, the updated ODB file once
again at:
https://wiki.documentfoundation.org/File:Linkme.odb

In the basic script did a little refactoring, so it is not quite as ugly
as it was and added the ability to save the image control display
settings into the database record, per image link, and then decode that
and set the image control appropriately as you move through the record
set.

Three things are left un-done and maybe they should be, as something to
be added by the final user:

1 - when a new record is created, if the user clicks on an image control
setting (scale mode / bckground color) the values are encoded and
written to the record in memory, since the image link is not a required
field the user could store this, which doesn't really make a lot of
sense.

2 - When the saved image control settings are read back the image
control is updated, but not the displayed value for the three scale mode
checkbox controls or the background color list box.

3 - Setting the image control background to Transparent just doesn't
work - don't now why, setting the value to EMPTY should equal 'Default'
and that should be Transparent, IIRC... but maybe someone can figure
that out.

Also - changed the UI of the form a little.
- The datacontrol (textbox) for the stored image link is again
displayed, but as read only. You still use the File Selector to update
the value.

Guess that's it really then for the basic script stuff.

So the hard part, for me at least, is left which is explaining how this
works.

I've got a fair bit of time today, so can work on that - any help with
that is always welcome.

Last but not least - Drag n Drop - you know we could add that to the
form. It requires diving a bit deeper into the API, as one needs to
create runtime listeners for events (not the same as filling in slots no
the control property editor at design time), not today - but it is
something that can be done with scripting also.

//drew

Hi Drew,

The database is really looking polished now, and I think I have a great
starting point from which to integrate into my own databases. If you do find
out how to implement drag and drop, please let me know. I am really thankful
for your help!

My schedule is kind of crazy for the next couple of weeks, but if you can
draft an explanation for how all this works, I would be more than willing to
follow it along, and help with editing it. Please let me know!

Thanks again!