Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Firbird Base - Forms - ReadOnly Value ignored

I am running LibreOffice 6.2.5.2 and 6.3.1.2 on OpenSuse Leap 15.1 The issue appears after migrating to Firebird using Forms programmed with libreoffice basic and is reproducible. Changing the ReadOnly property is ignored, field remains readonly. This problem occurs only if the field is connected to a view field or an analyzed SQL statement. Even unsetting teh Textfield to be connected to view field does not change anything. Creating a non connected field (not connected to any field of a view or an SQL statement) does not show this problem.

Code example

txtFieldName = oForm.getByname("txtName") txtFieldName.ReadOnly = FALSE

Using Firebird the setting is ignored, using HSQLDB the setting is doing what it should do: It allows the modification of the field (using the same Libreoffice versions).

Ugly workaround: Set setting ReadOnly in the form of the field to true. Save the form. Change the setting back to False. Save the form again. Then change from edit mode to life input mode and the field is editable. Using the embedded HSQLDB this problem does not appear.

Oh: Querying the setting (getPropertyValue) delivers the setting as it was set by the program, but it is simply ignored.

Any help is highly appreciated. kind regards Franz

P.S.: The changed field content is read by the program and then reused in an SQL statement to update the record.