http://www.oooforum.org/forum/viewtopic ... highlight=
but in this forum I can not attached the document. So, I am now here.
My problem is that cursor is not in field SifraArtikla, in my dialog (in Calc) after this code. When I again push the same code, then cursor is there. Can somebody help me about this?
I am using Oo 3.3 Win.
Code: Select all
Sub CLEARFIELDS
SifraArtikla = prozorRACUNI.getControl("NumericField1")
NazivArtikla = prozorRACUNI.getControl("TextField1")
Kolicina = prozorRACUNI.getControl("NumericField2")
MPcena = prozorRACUNI.getControl("NumericField3")
OsnovicaZaPDV = prozorRACUNI.getControl("NumericField8")
StopaPDV = prozorRACUNI.getControl("NumericField9")
ObracunatPDV = prozorRACUNI.getControl("NumericField10")
MPvrednost = prozorRACUNI.getControl("NumericField12")
Lager = prozorRACUNI.getControl("NumericField13")
TipArtikla = prozorRACUNI.getControl("TextField3")
NazivArtikla.getModel().SetPropertyToDefault("Text")
Kolicina.getModel().SetPropertyToDefault("Value")
MPcena.getModel().SetPropertyToDefault("Value")
OsnovicaZaPDV.getModel().SetPropertyToDefault("Value")
StopaPDV.getModel().SetPropertyToDefault("Value")
ObracunatPDV.getModel().SetPropertyToDefault("Value")
MPvrednost.getModel().SetPropertyToDefault("Value")
TipArtikla.getModel().SetPropertyToDefault("Text")
Lager.getModel().SetPropertyToDefault("Value")
SifraArtikla.getModel().SetPropertyToDefault("Value")
SifraArtikla.setFocus() ' <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< this line is important
End Sub