Ariel Constenla-Haile wrote:
Hi Peter,

Peter Eberlein escribió:
The original question remains (subject):
I can add an image control manually to the form, but how to commit a picture without the whole api stream stuff...

tested on 2.4.0 with HSQLDB embedded, and with MySQL (JDBC/UnixODBC), the steps are just insert the image control, bind it to the binary field, and that's all: right click, and choose the image. If you already tried this, and checked other stuff (for example PK), this may be an issue.

Hi

I know this is not quite the proper response for a DEV list email, rather a USERS list...so forgive me.

This could be an issue as in bug - but it could be something different also.

Image controls are little funny in that they don't receive focus from the desktop manager and because of this you can get into trouble if you layout the form without this in mind. For instance if you have an image control as the only control belonging to, or displayed from a datacontrol where the datacontrol is sub-form. But IIRCC that is not the only way to get in trouble with it.

There is an old discussion about this in an old post ( circa OO.o 2.0 ) at oooforum that touches on this image control issue and it could use a new round perhaps.

Saving you some time to dig through a very long and rambling post there, here is the section of interest.

Now, when I split the Photo column out of the employees table and created the emploueePhotos table with just 2 fields I was setting up a lack of focus problem. To add the image control to our form I had to to do this.



<snip>



The same is done for the employeeNotes table.


<snip>

Now at run time notice that as I move from one of the controls on the main form to the notes control the form navigation bar updates itself to reflect the different record counts, etc. between the two distinct dataform objects. Each assigned to a different physical table. This change on the navigation bar is triggered by a change of focus amongst the controls. And here is the problem, the image control can't receive focus, so the navigation bar never knows to switch over to its dataform object. I can add images it it (the image control), remove images from it all I want, but the form navigation bar will never allow me to save the controls contents to to the underlying table.

If I had any control attached to the employeePhotos table, that could receive focus, then moving into it would activate the navigation bar and it would immediately recognize the change in state of the image control allowing me to save the data. But I have no column that would make sense, and even if I did it would be a very awkward process then for the user. One other solution, using basic code, would be to assign one of the Mouse Button events to a procedure and in the procedure change the status of the dataform object for employeePhotos table. Remember though, this example was to use now basic code.


--
OpenOffice.org User Community Forum: http://user.services.openoffice.org
United States PostgreSQL Association: http://www.postgresql.us/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to