[ Pannello di Controllo Moderatore ]
REM ***** BASIC *****
' You need two controls in your form(document). They must be in the same form(as in navigator).
' One control is a text control and contains the pathname or url to the file.
' The second control is a button.
' The action is bound to the first event of the button control: Before commencing. ' Name before OOo3.2
' The name is new in OOo3.2 and later : Approve action
' The function can be aborted when the files does not exist.
' You have also change the properties of the button control.
' The action is :Open document/webpage.
' The small macro move the field value from the textbox to the button control url
function openurl(oEv as object)
'
dim oForm,oTextBox
oForm=oEv.source.model.parent
oTextBox=oForm.getbyname("TextBox")
if FileExists ( oTextBox.text) then
oEv.source.model.targeturl=oTextBox.text
openur=true ' Do the programm when the file exists
else
openurl=false ' The file does not exist and do nothing
end if
'print convertfromurl(oTextBox.text)
End function
pinko ha scritto:mi spieghi come si fa ad abbinare un pulsante ad una sottomaschera piuttosto che al Main Form.
Visitano il forum: Nessuno e 1 ospite