[Solved] Refresh(), Reload() Textfield

Creating and using forms
Post Reply
Maiskolben
Posts: 3
Joined: Sun Jan 08, 2017 2:36 pm

[Solved] Refresh(), Reload() Textfield

Post by Maiskolben »

Hey guys,

last few hours I tried to get the refresh of an textfield working. When I select some values from a dropdoanmenu, a textfield which I use as an outputfield (another column in a database, but from the same dataset) on the same document (writer) won't be refreshed! It's refreshing, as I click insinde the textfield, but I want do have it immidiately after select something in the dropdownmenu.

Code: Select all

objForm = ThisComponent.DrawPage.Forms(0)
oText = objForm.getByName("AusgabeTextfeldNettopreise").Text
'objForm.getByName("AusgabeTextfeldNettopreise").commit(True)
'objForm.updateRow()
'oText.reload() 'at this point script stop working: no variable declared
I dont know any other way to update a textfield immidiately after a dropdownmenu-item is selected. Any suggestions?
Last edited by Hagar Delest on Mon Jan 09, 2017 7:49 pm, edited 1 time in total.
Reason: tagged [Solved].
OpenOffice 4.1 on Windows 7 64Bit
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Refresh(), Reload() Textfield

Post by Villeroy »

You never update any text fields. It always shows the textual representation of the current record's field values. You update the form's underlying database record or the database records of combo boxes or list boxes.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Maiskolben
Posts: 3
Joined: Sun Jan 08, 2017 2:36 pm

Re: Refresh(), Reload() Textfield

Post by Maiskolben »

Hey Villeroy, thanks for your answer! I just posted another thread in "beginners". Cheers
OpenOffice 4.1 on Windows 7 64Bit
Post Reply