[Solved] Refresh(), Reload() Textfield

Creating and using forms

[Solved] Refresh(), Reload() Textfield

Postby Maiskolben » Sun Jan 08, 2017 2:44 pm

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   Expand viewCollapse view
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
Maiskolben
 
Posts: 3
Joined: Sun Jan 08, 2017 2:36 pm

Re: Refresh(), Reload() Textfield

Postby Villeroy » Sun Jan 08, 2017 3:15 pm

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, no OpenOffice, LibreOffice 6.4
User avatar
Villeroy
Volunteer
 
Posts: 28573
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Refresh(), Reload() Textfield

Postby Maiskolben » Mon Jan 09, 2017 11:32 am

Hey Villeroy, thanks for your answer! I just posted another thread in "beginners". Cheers
OpenOffice 4.1 on Windows 7 64Bit
Maiskolben
 
Posts: 3
Joined: Sun Jan 08, 2017 2:36 pm


Return to Forms

Who is online

Users browsing this forum: No registered users and 5 guests