George, You refer to this from the ReadMe:
Notes and Warnings 4. On Windows Mobile 5 devices, OptionButton groups are not working properly on OptionButton objects that are added using the Forms designer. They work properly if added using the AddObject command in your Form_Open code. (We will fix this of course!) You say to put the AddObject-OptiobButton inside the Form_Load_script by hand. >From the below example generated code from the editor the "Form_Load"vbscript code is run by the "Execute(theSub)". Can you also get around the problem by having your OptionButton's placed onto a 2nd Form created in the editor and not the main 1st Form ? When you display your 2nd Form in your program you would normally do the following: Call Form2_Show But if you display your 2nd Form using this call: callIfExists("Form2_Show") It will be created via the "Execute(theSub)" call. I have tested this and it does display the 2nd Form but since I do not have a WM5 device I can not verify if the OptionButton Groups work by doing this workaround. If it does work, then users can still place the OptionButtons onto a Form inside the Editor and not then manually have to add the OptionButton in the Form_Load section. It will allow them to design the Form's with the editor. Also when is a true fix going to be available ? Joe --- In nsbasic...@yahoogroups.com, "George Henne" <g...@...> wrote: > > The problem is noted in the ReadMe - it started happening with Windows > Mobile 5. The workaround is to create your option buttons using > AddObject in your Form_Load script. > > George Henne > NS BASIC Corporation > http://www.nsbasic.com > > >Randall, > > > >I tested this on PPC2003 device and it works. I assume your reference of > >it working on a WM2003 refers to the same OS as PC2003. > > > >So the latest devices using OS of WM5 or WM6 is now broken. > > > > > >Try placing the Option buttons inside a "Frame" object. See if this > >makes a difference - with the options inside a Frame maybe the OS will > >detect they are grouped. > > > >Joe > > > > > >--- In nsbasic...@yahoogroups.com, "Randall Jones" <randalljones@> wrote: > >> > >> joespan123, > >> > >> I can't get the grouping to work using any method ... even AddObject > >> instead of the IDE. > >> > >> However ... the same code executed on a WM2003 device works just > >> fine. > >> > >> I find that quite interesting. > >> > >> At your service ... > >> > >> Randall Jones > >> AE7RJ > >> > >> > >> > >> > >> > Hi, > >> > > >> > I just tried the Option button's by adding 2 buttons to a form and > >setting the 2nd one Group=False. Below is the generated code. > >> > > >> > It works for me - that is selecting a option button forces the other > >button to unselect. > >> > > >> > Cut and paste this code into a TEXT file and load it up in the > >editor and run it. See if it works. > >> > > >> > > >> > > >> > '*** Begin Generated Code *** > >> > > >> > > >> > Form1_Show 'Default Form > >> > > >> > Dim Form1_Temp > >> > Sub Form1_Show > >> > On Error Resume Next > >> > > >> > UpdateScreen > >> > > >> > If IsEmpty(Form1_Temp) Then > >> > AddObject "Frame", "Form1_Form", 0, 0, Output.Width, Output.Height > >> > Form1_Form.Visible = False > >> > Form1_Form.BackColor = 12632256 > >> > AddObject "PictureBox", "Form1", 0, 0, 0, 0, Form1_Form > >> > Form1.BorderStyle = 0 > >> > Form1.Move 0, 0, Form1_Form.Width * 15, Form1_Form.Height * 15 > >> > Set Form1_Temp = Form1 > >> > Form1_Form.Caption = "Form1" > >> > > >> > AddObject "OptionButton", "OptionButton1", 27, 33, 92, 21, > >Form1_Form > >> > OptionButton1.BackColor = 12632256 > >> > OptionButton1.Caption = "OptionButton1" > >> > OptionButton1.FontSize = 8.25 > >> > '-------- > >> > AddObject "OptionButton", "OptionButton2", 32, 89, 92, 21, > >Form1_Form > >> > OptionButton2.BackColor = 12632256 > >> > OptionButton2.Caption = "OptionButton2" > >> > OptionButton2.FontSize = 8.25 > >> > OptionButton2.Group = False > >> > '-------- > >> > End If > >> > On Error Goto 0 > >> > Form1_Form.Visible = True > >> > callIfExists("Form1_Load") > >> > End Sub 'Form1_Show > >> > > >> > Sub Form1_Hide > >> > If IsEmpty(Form1_Temp) Then > >> > Err.Raise 44000, , "Form not loaded" > >> > Exit Sub > >> > End If > >> > > >> > Form1_Form.Visible = False > >> > callIfExists("Form1_Unload") > >> > End Sub 'Form1_Hide > >> > > >> > Sub CallIfExists(theSub) > >> > Dim s > >> > If ScriptEngineMajorVersion < 5 Then > >> > Execute("On Error Resume Next:"&theSub) 'attempt to execute it > >> > Else > >> > On Error Resume Next > >> > Set s = GetRef(theSub) > >> > If err.Number <> 0 Then Exit Sub 'it does not exist > >> > On Error GoTo 0 > >> > Execute (theSub) 'execute it > >> > End If > >> > End Sub > >> > > >> > '*** End Generated Code *** > >> > > >> > > >> > > >> > > >> > --- In nsbasic...@yahoogroups.com, "bwolodko" <ben.wolodko@> wrote: > >> > > > >> > > --- In nsbasic...@yahoogroups.com, "Randall Jones" <randalljones@> > >wrote: > >> > > > > >> > > > I'm beginning to take this personal. > >> > > > > >> > > > I am trying to create grouped optionbuttons. The language reference > >> > > > says it goes like this. > >> > > > > >> > > > - Create the first button. Set the group property to true. > >> > > > - Create the subsequent buttons group property to false. > >> > > > > >> > > > They will all be in the same group. Idea being that within that > group > >> > > > only 1 button can be set at a time. Clicking on a button will clear > >> > > > any button already set. > >> > > > > >> > > > This is not happening for me. I can set all buttons no matter what. > >> > > > > >> > > > I'm doing something wrong. Somebody please tell me what it is. > >> > > > > >> > > > At your service ... > >> > > > > >> > > > Randall Jones > >> > > > randalljones@ > >> > > > AE7RJ > >> > > > > >> > > > "We can't solve problems by using the same kind of thinking we used > >> > > > when we created them." > >> > > > --Albert Einstein (1879-1955) > >> > > > > >> > > Don't you just love programming with less than stellar examples ... > >> > > especially when you are just learning as I am as well.. > >> > > > >> > > I am developing for a CuWin3500 HMI device, having CE 5.0 in it. > >> > > > >> > > I posed a similar question a few weeks ago, and did not get any replys. > >> > > > >> > > I have the same issue, with Radio or Option Buttons. > >> > > > >> > > What I found was that I had to do the following > >> > > > >> > > Option Explicit > >> > > Dim HoleType > >> > > > >> > > Sub OB1_Click > >> > > HoleType="Mechanical" > >> > > OB1.ForeColor = &H000000C0& > >> > > OB1.Value = True > >> > > OB2.Value = False > >> > > OB2.ForeColor =&H00000000& > >> > > OB3.Value = False > >> > > OB3.ForeColor =&H00000000& > >> > > OB4.Value = False > >> > > OB4.ForeColor =&H00000000& > >> > > End Sub > >> > > > >> > > Sub OB2_Click > >> > > HoleType="Hand Hole" > >> > > OB2.ForeColor =&H000000C0& > >> > > OB2.Value = True > >> > > OB1.Value = False > >> > > OB1.ForeColor =&H00000000& > >> > > OB3.Value = False > >> > > OB3.ForeColor =&H00000000& > >> > > OB4.Value = False > >> > > OB4.ForeColor =&H00000000& > >> > > End Sub > >> > > > >> > > etc for each radio button > >> > > > >> > > In essence, make one button's Value TRUE, and all the rest False > >> > > > >> > > >> > > >> > > >> > > >> > > > > > > > > > >------------------------------------ > > > >Yahoo! Groups Links > > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nsb-ce" group. To post to this group, send email to nsb-ce@googlegroups.com To unsubscribe from this group, send email to nsb-ce+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/nsb-ce?hl=en -~----------~----~----~----~------~----~------~--~---