OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

How to Insert a Picture in a Dialog Box, Not a Link for it

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
caravas
General User
General User


Joined: 05 Sep 2011
Posts: 31

PostPosted: Sun Apr 22, 2012 6:51 am    Post subject: How to Insert a Picture in a Dialog Box, Not a Link for it Reply with quote

Hi folks!

Does anyone know how to insert a picture and not only a link to it, in a dialog box?
When I try to insert a picture as a dialog box background, I can not set off the option selection Link to it. So, if a copy the document to another computer, the dialog box loses all the pictures connections.

Thanks in advance!
Back to top
View user's profile Send private message MSN Messenger
caravas
General User
General User


Joined: 05 Sep 2011
Posts: 31

PostPosted: Tue Apr 24, 2012 4:50 pm    Post subject: Reply with quote

Well,

If someone else needs, there's an alternative solution. You may need to create a subfolder to place your pictures and if you want to copy your files to another computer, just copy the subfolder together with your file:

Code:
Sub LoadBiblio
   
    oDoc = ThisComponent
        oDocURL = oDoc.getURL()
     
     If (Not GlobalScope.BasicLibraries.isLibraryLoaded("Tools")) Then
       GlobalScope.BasicLibraries.LoadLibrary("Tools")
     End If
   
    oUrl = DirectoryNameoutofPath(oDocURL, "/")& "/Files/Picture.bmp"

   oDlgEntra = CreateUnoDialog(DialogLibraries.Library1.DlgEntra)
   oDlgEntra.setTitle("Informe MatrĂ­cula e Senha!")
   oControlModel = oDlgEntra.GetControl("ImageControl1").GetModel()
   oControlModel.ImageURL  = oURL
   oDlgEntra.Execute()
   
End Sub
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group