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

Editing dialogs by hand

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


Joined: 04 Feb 2004
Posts: 48

PostPosted: Sat May 01, 2004 1:24 pm    Post subject: Editing dialogs by hand Reply with quote

This must be a newbie question.

How do I edit a dialog by hand after I have created one using the dialog editor?

Thanks,
Joel
Back to top
View user's profile Send private message Send e-mail
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Sat May 01, 2004 1:53 pm    Post subject: Reply with quote

Tools> Macros > Macro > Organiser > Modules (Tab)
Select the dialog you require , by name . They are marked by green squares in the macro/dialog panel.
Click EDIT button and you are in the same mode as when you created the dialog.
Back to top
View user's profile Send private message
Joel Hammer
General User
General User


Joined: 04 Feb 2004
Posts: 48

PostPosted: Sat May 01, 2004 3:15 pm    Post subject: Reply with quote

Doing that just puts me into the graphical editing mode.

I want to be able to edit the basic code itself by hand (assuming those dialog boxes are in basic).

Joel
Back to top
View user's profile Send private message Send e-mail
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Sat May 01, 2004 5:49 pm    Post subject: Reply with quote

Well your assumption confused me. The dialogs are not basic code, they are xml and stored in .xdl files. An example, from xray, is
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DlgArray" dlg:left="7" dlg:top="49" dlg:width="240" dlg:height="196" dlg:closeable="true" dlg:moveable="true">
 <dlg:styles>
  <dlg:style dlg:style-id="0" dlg:border="3d"/>
  <dlg:style dlg:style-id="1" dlg:font-name="Courier New;Cumberland;Bitstream Vera Sans Mono" dlg:font-height="9" dlg:font-stylename="Normal" dlg:font-family="modern"/>
 </dlg:styles>
 <dlg:bulletinboard>
  <dlg:button dlg:id="CommandButton1" dlg:tab-index="2" dlg:left="202" dlg:top="10" dlg:width="30" dlg:height="12" dlg:default="true" dlg:value="Close" dlg:button-type="ok"/>
  <dlg:text dlg:style-id="0" dlg:id="LabindexMin" dlg:tab-index="1" dlg:left="102" dlg:top="10" dlg:width="70" dlg:height="12" dlg:align="center"/>
  <dlg:text dlg:style-id="0" dlg:id="LabindexMax" dlg:tab-index="3" dlg:left="102" dlg:top="26" dlg:width="70" dlg:height="12" dlg:align="center"/>
  <dlg:text dlg:id="Label4" dlg:tab-index="4" dlg:left="6" dlg:top="34" dlg:width="61" dlg:height="10" dlg:value="List of values"/>
  <dlg:text dlg:style-id="0" dlg:id="LabTypeElem" dlg:tab-index="5" dlg:left="4" dlg:top="10" dlg:width="83" dlg:height="12" dlg:align="center"/>
  <dlg:textfield dlg:style-id="1" dlg:id="AffValues" dlg:tab-index="0" dlg:left="6" dlg:top="44" dlg:width="227" dlg:height="148" dlg:hscroll="true" dlg:vscroll="true" dlg:multiline="true" dlg:readonly="true"/>
 </dlg:bulletinboard>
</dlg:window>
You can modify the properties at run time through Basic or any language that can talk to the api by locating the control within the document and setting the properties ,
or use any editor on the .xdl .
Back to top
View user's profile Send private message
Joel Hammer
General User
General User


Joined: 04 Feb 2004
Posts: 48

PostPosted: Sat May 01, 2004 6:23 pm    Post subject: Reply with quote

Thanks.

Joel
Back to top
View user's profile Send private message Send e-mail
pitonyak
Administrator
Administrator


Joined: 09 Mar 2004
Posts: 3655
Location: Columbus, Ohio, USA

PostPosted: Sat May 01, 2004 7:23 pm    Post subject: Reply with quote

My Macro document contains examples of manipulating dialog controls from BASIC if you require samples. I also have some examlpes on my web site.

If required, you can build a dialog completely in code, but this can be a bit tedious...
_________________
--
Andrew Pitonyak
http://www.pitonyak.org/oo.php
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
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