Re: [libreoffice-users] Programatically changing the properties of a multselection (group)

2012-02-10 Thread Tom Davies
Hi :)
Brilliant!  Nicely found!  I didn't realise you had already read both of them 
and i don't normally like rtfm-type answers so we both got lucky there.
Regards from
Tom :)



--- On Fri, 10/2/12, Russell D Mileham  wrote:

From: Russell D Mileham 
Subject: Re: [libreoffice-users] Programatically changing the properties of a 
multselection (group)
To: users@global.libreoffice.org
Date: Friday, 10 February, 2012, 14:59

Thanks Tom,

I have both of the references you referred to, but as you suggested I went back 
to them while I was waiting for a reply. On the umpteenth time going through 
the Basic Guide I found a code snippet that made an obscure reference to 
getGroupByName, and that was the piece I was missing!

Thanks again to you and Jay Lozier for your help.

Best Regards,
Russ Mileham


On Thu, 9 Feb 2012 22:06:25 + (GMT)
Tom Davies  wrote:

> Hi :)
> A good guide to macros is listed at the bottom of the "Programmers" section 
> of 3rd party documentation 
> http://wiki.documentfoundation.org/Documentation/Publications#Programmers
> A direct link to Andrew Pitonyak's page is here
> http://www.pitonyak.org/oo.php
> There might be other guides to help you learn Macro language better while you 
> are waiting for responses from this list.  
> 
> Good luck and regards from
> Tom :)
> 
> 
> --- On Thu, 9/2/12, Jay Lozier  wrote:
> 
> From: Jay Lozier 
> Subject: Re: [libreoffice-users] Programatically changing the properties of a 
> multselection (group)
> To: users@global.libreoffice.org
> Date: Thursday, 9 February, 2012, 20:05
> 
> On 02/09/2012 02:34 PM, Russell D Mileham wrote:
> > I am building a Base form where I would like to group several controls and 
> > enable/disable them based on the actions of the user. When I group the 
> > controls, the Enabled property can be set in the Properties: Multiselection 
> > dialog through the GUI, but I can't seem to figure out how to access the 
> > group properties in a macro. I have tried accessing a Model of the Group 
> > using getByName(GroupName), followed by accessing the view using 
> > getControl(Model). However, it appears that what I get is a Model and View 
> > of the first control element contained in the group. Can someone point me 
> > in the right direction?
> > 
> > Thanks,
> Can you post a copy of the form and code on Nabble or somewhere else so 
> others can look at. Just send a message with the appropriate links.  There 
> are couple on the list who are very good a macros.
> 
> Email attachments are stripped from the list if you send directly to the list
> 
> -- Jay Lozier
> jsloz...@gmail.com
> 
> 
> -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
> Problems? 
> http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
> Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
> List archive: http://listarchives.libreoffice.org/global/users/
> All messages sent to this list will be publicly archived and cannot be deleted
> 
> 
> -- 
> For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
> Problems? 
> http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
> Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
> List archive: http://listarchives.libreoffice.org/global/users/
> All messages sent to this list will be publicly archived and cannot be deleted
> 
> 


-- 
Russell D Mileham 

-- 
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


-- 
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Programatically changing the properties of a multselection (group)

2012-02-10 Thread Russell D Mileham
Thanks Tom,

I have both of the references you refered to, but as you suggested I went back 
to them while I was waiting for a reply. On the umpteenth time going through 
the Basic Guide I found a code snippet that made an obscure reference to 
getGroupByName, and that was the piece I was missing!

Thanks again to you and Jay Lozier for your help.

Best Regards,
Russ Mileham


On Thu, 9 Feb 2012 22:06:25 + (GMT)
Tom Davies  wrote:

> Hi :)
> A good guide to macros is listed at the bottom of the "Programmers" section 
> of 3rd party documentation 
> http://wiki.documentfoundation.org/Documentation/Publications#Programmers
> A direct link to Andrew Pitonyak's page is here
> http://www.pitonyak.org/oo.php
> There might be other guides to help you learn Macro language better while you 
> are waiting for responses from this list.  
> 
> Good luck and regards from
> Tom :)
> 
> 
> --- On Thu, 9/2/12, Jay Lozier  wrote:
> 
> From: Jay Lozier 
> Subject: Re: [libreoffice-users] Programatically changing the properties of a 
> multselection (group)
> To: users@global.libreoffice.org
> Date: Thursday, 9 February, 2012, 20:05
> 
> On 02/09/2012 02:34 PM, Russell D Mileham wrote:
> > I am building a Base form where I would like to group several controls and 
> > enable/disable them based on the actions of the user. When I group the 
> > controls, the Enabled property can be set in the Properties: Multiselection 
> > dialog through the GUI, but I can't seem to figure out how to access the 
> > group properties in a macro. I have tried accessing a Model of the Group 
> > using getByName(GroupName), followed by accessing the view using 
> > getControl(Model). However, it appears that what I get is a Model and View 
> > of the first control element contained in the group. Can someone point me 
> > in the right direction?
> > 
> > Thanks,
> Can you post a copy of the form and code on Nabble or somewhere else so 
> others can look at. Just send a message with the appropriate links.  There 
> are couple on the list who are very good a macros.
> 
> Email attachments are stripped from the list if you send directly to the list
> 
> -- Jay Lozier
> jsloz...@gmail.com
> 
> 
> -- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
> Problems? 
> http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
> Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
> List archive: http://listarchives.libreoffice.org/global/users/
> All messages sent to this list will be publicly archived and cannot be deleted
> 
> 
> -- 
> For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
> Problems? 
> http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
> Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
> List archive: http://listarchives.libreoffice.org/global/users/
> All messages sent to this list will be publicly archived and cannot be deleted
> 
> 


-- 
Russell D Mileham 

-- 
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Programatically changing the properties of a multselection (group)

2012-02-09 Thread Tom Davies
Hi :)
A good guide to macros is listed at the bottom of the "Programmers" section of 
3rd party documentation 
http://wiki.documentfoundation.org/Documentation/Publications#Programmers
A direct link to Andrew Pitonyak's page is here
http://www.pitonyak.org/oo.php
There might be other guides to help you learn Macro language better while you 
are waiting for responses from this list.  

Good luck and regards from
Tom :)


--- On Thu, 9/2/12, Jay Lozier  wrote:

From: Jay Lozier 
Subject: Re: [libreoffice-users] Programatically changing the properties of a 
multselection (group)
To: users@global.libreoffice.org
Date: Thursday, 9 February, 2012, 20:05

On 02/09/2012 02:34 PM, Russell D Mileham wrote:
> I am building a Base form where I would like to group several controls and 
> enable/disable them based on the actions of the user. When I group the 
> controls, the Enabled property can be set in the Properties: Multiselection 
> dialog through the GUI, but I can't seem to figure out how to access the 
> group properties in a macro. I have tried accessing a Model of the Group 
> using getByName(GroupName), followed by accessing the view using 
> getControl(Model). However, it appears that what I get is a Model and View of 
> the first control element contained in the group. Can someone point me in the 
> right direction?
> 
> Thanks,
Can you post a copy of the form and code on Nabble or somewhere else so others 
can look at. Just send a message with the appropriate links.  There are couple 
on the list who are very good a macros.

Email attachments are stripped from the list if you send directly to the list

-- Jay Lozier
jsloz...@gmail.com


-- For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


-- 
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Programatically changing the properties of a multselection (group)

2012-02-09 Thread Russell D Mileham
On Thu, 09 Feb 2012 15:05:43 -0500
Jay Lozier  wrote:



> Can you post a copy of the form and code on Nabble or somewhere else so 
> others can look at. Just send a message with the appropriate links.  
> There are couple on the list who are very good a macros.

I will work on getting the form out somewhere accessable. In the mean time, the 
code I am trying to use looks like this:

Sub updateControlValue(Event As Object)

Dim Form As Object
Dim Controller As Object
Dim Model As Object
Dim Control As Object

Form=Event.Source.Model.Parent
Model=Form.getByName("testGroup")
Controller=Form.Parent.Parent.CurrentController
Control=Controller.getControl(Model)
Control.Enable=FALSE

End Sub


This works well on an individual form control, but when trying to apply it to a 
Group of controls it fails to change the Multiselection Property. My gut tells 
me that there is a different Method or Service that I need to use to access the 
Group Properties, but I haven't had any luck identifying what it is.

Thanks,
Russ Mileham


-- 
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



Re: [libreoffice-users] Programatically changing the properties of a multselection (group)

2012-02-09 Thread Jay Lozier

On 02/09/2012 02:34 PM, Russell D Mileham wrote:

I am building a Base form where I would like to group several controls and 
enable/disable them based on the actions of the user. When I group the 
controls, the Enabled property can be set in the Properties: Multiselection 
dialog through the GUI, but I can't seem to figure out how to access the group 
properties in a macro. I have tried accessing a Model of the Group using 
getByName(GroupName), followed by accessing the view using getControl(Model). 
However, it appears that what I get is a Model and View of the first control 
element contained in the group. Can someone point me in the right direction?

Thanks,
Can you post a copy of the form and code on Nabble or somewhere else so 
others can look at. Just send a message with the appropriate links.  
There are couple on the list who are very good a macros.


Email attachments are stripped from the list if you send directly to the 
list


--
Jay Lozier
jsloz...@gmail.com


--
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted



[libreoffice-users] Programatically changing the properties of a multselection (group)

2012-02-09 Thread Russell D Mileham

I am building a Base form where I would like to group several controls and 
enable/disable them based on the actions of the user. When I group the 
controls, the Enabled property can be set in the Properties: Multiselection 
dialog through the GUI, but I can't seem to figure out how to access the group 
properties in a macro. I have tried accessing a Model of the Group using 
getByName(GroupName), followed by accessing the view using getControl(Model). 
However, it appears that what I get is a Model and View of the first control 
element contained in the group. Can someone point me in the right direction?

Thanks,
-- 
Russell D Mileham 

-- 
For unsubscribe instructions e-mail to: users+h...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted