Hi all,

While following the German users list, this topic came up recently. I'll leave 
the original post in German since I know that some of the devs here on this 
list are native German speakers, translation follows :


START_OF_OP

ich möchte in OOo-Base eine Listbox per Makro auffrischen.

I want to have a listbox in Base (a form) refresh itself via macro.
Mein Formular sieht z.B. so aus:


My form looks like this :


Hauptformular: MainForm
Sub-Formular: SubForm
auf dem Sub-Formular eine Tabelle: SubGrid
in dieser Tabelle eine Spalte mit Listenfeld: Spalte_Listbox


The Subform has a table : SubGrid
This table contains a column with a listbox

Wie kann ich mit *.refresh() auf Spalte_Listbox konkret zugreifen?

How can I use *.refresh() to get the listbox to refresh its data ?


Ich antworte mir mal selber. :-)

I've found the answer myself.

Ein Refresh der Listbox ist nicht unbedingt erforderlich. Es reicht
aus, das Subformular per Marko neu einzulesen, so etwa:

It is not necessary to use a refresh on the listbox. It is sufficient to get 
the macro to reread the form, like this :


oFormHaupt = thisComponent.drawPage.forms.getByName("MainForm")
oFormSub = oFormHaupt.getByName("SubForm")
oFormSub.reload

Das funktioniert mit OOo 2.0.4 und OOo 2.3.1; ab 2.4-RCx und in
der finalen Version 2.4 funktioniert es so leider nicht mehr.
Mal schauen was da geändert wurde, vielleicht ist es nur ein Bug.

This works in OOo 2.0.4 and 2.3.1. Starting from 2.4-RCx and in the final 
version of 2.4, this technique no longer works.
Maybe this is a bug.

END_OF_OP


The thread that this generated has led to the OP putting up a sample DB on the 
web at the following address :

http://www.alinux.de/ooo/Angel-Datenbank.odb

Other posters in the same thread have also commented that the refresh function for forms in general, independently of any macro activity, i.e. directly via the refresh buttons on the toolbar, appears to be broken in 2.4 :-(

Alex






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

Reply via email to