Microsoft KB Archive/245062

= PRB: OptionButtons Do Not Hold Logical Values =

Article ID: 245062

Article Last Modified on 4/25/2000

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q245062



SYMPTOMS
In Visual FoxPro 5, it was possible to set OptionButtons to have logical values instead of numeric. However, in Visual FoxPro 6, this behavior changed. While the buttons can be set to logical values, clicking on a button will cause the button's value property to be reset to numeric.



CAUSE
OptionButtons should only have numeric values, even if the interface allows them to be set differently.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
  Run the following code in Visual FoxPro 6.0: PUBLIC loForm

loForm = CREATEOBJECT("form") WITH loForm .AddObject('opgTest', 'optiongroup') WITH .opgTest .ButtonCount = 3

.Option1.Value = .T.     .Option2.Value = .F.      .Option3.Value = .F.

.Visible = .T.     .AutoSize = .T.   ENDwith .Visible = .T. ENDwith   Open the debugger, and put the following values in the Watch window: loForm.opgTest.option1.value loForm.opgTest.option2.value loForm.opgTest.option3.value  Click the buttons and watch the debugger.

  When first run: .T. .F. .F.   Click Option2: 0 1 .F.   Click Option3: 0 0 1                           </li></ul> </li></ol>

Additional query words: kbDSE

Keywords: kbcodesnippet kbdesigner kbprb kbctrl KB245062

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.