Difference between revisions of "Talk:Documentation/BASIC Guide/Control Element Forms"
From Apache OpenOffice Wiki
Ottoshmidt (Talk | contribs) (Created page with '== Option Button grouping method == The code described in this article used to group Option Buttons returns an error: File:Lens_diff.png this error is caused by the fo…') |
Ottoshmidt (Talk | contribs) |
||
Line 42: | Line 42: | ||
See: [http://www.oooforum.org/forum/viewtopic.phtml?t=28446] and [http://user.services.openoffice.org/en/forum/viewtopic.php?f=20&t=12517] | See: [http://www.oooforum.org/forum/viewtopic.phtml?t=28446] and [http://user.services.openoffice.org/en/forum/viewtopic.php?f=20&t=12517] | ||
+ | |||
+ | --[[User:Ottoshmidt|Ottoshmidt]] 07:24, 30 March 2010 (UTC) |
Revision as of 07:24, 30 March 2010
Option Button grouping method
The code described in this article used to group Option Buttons returns an error:
this error is caused by the following line:
Ctl = Form. GetGroupbyName("MyOptions")
However I found this method that works fine:
Function test Dim oGroup as object Dim Doc As Object Dim Forms As Object Dim Form As Object Dim Ctl As Object Dim I as Integer Doc = ThisComponent Forms = Doc.Drawpage.Forms Form = Forms.GetbyIndex(0) oForm.getGroupByName("MyOptions", oGroup) msg="" for i=0 to UBound(oGroup) oCtl = oGroup(i) msg = msg + oCtl.Name + " " + (str(oCtl.State)) + chr(10) next i MsgBox msg end Function
--Ottoshmidt 07:24, 30 March 2010 (UTC)