Focal Point
[SOLVED] WF Maintain -- Can WINFORM SET change the value of a Radio Group?

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/705102444

May 17, 2010, 03:31 PM
John_Edwards
[SOLVED] WF Maintain -- Can WINFORM SET change the value of a Radio Group?
I'm guessing the answer is no, but I have dozens of static radio groups and I want to set their current value via Maintain. WINFORM SET seems to have a lot of options, but none to actually set the value of the widget.

I'm very much hoping that I don't have to make dozens of stacks and recode each and every radio group on the page . . .

This message has been edited. Last edited by: Kerry,



May 17, 2010, 06:09 PM
Waz
From memory you have to set the index of the stack to set the radio button.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

May 18, 2010, 08:03 AM
Maintain Wizard
Hey John
This is not a problem. All you have to do is issue:
Compute Form.Object.ListItems.Focindex = n

Where Form is the name of your form and Object is the name of your radionbutton.
N is the row that you want the cursor on.

Since you are presetting, make sure you issue a Winform Show_Inactive form before displaying it.

Mark
May 18, 2010, 08:12 AM
GamP
A number of properties are dynamicly settable. Which ones are and which ones are not can be determined by the following method:
- activate the object on the form
- in the properties box for the object, select the desired property
- click the property name and keep the mouse button depressed
- if the mouse pointer does not change, the property is not settable, if it does change (to a forbidden symbol) then the property is settable and you can drag the property to the code window and release the mouse button there - you'll get the syntax entered in the code for the selected property.

In this case, static radio button, you're out of luck, I guess...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
May 18, 2010, 08:21 AM
GamP
Mark, I stand corrected - your method works like a charm. Never knew you could do it that way.
Why is it then that you can't drag 'n drop that particular property?


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
May 18, 2010, 08:41 AM
Maintain Wizard
I am never 100% sure why some controls can be set with a Winform Set and the others require a Compute. All I do is make sure that when I do discover something like this, it is added to the online help.

Mark
May 18, 2010, 09:42 AM
John_Edwards
That's exactly what I needed, thanks.

Online Help -- Damn hard to find. I believe this is the link -- http://documentation.informati...f761mtndev/index.htm

J.



May 18, 2010, 09:55 AM
Maintain Wizard
Inside the MDE, I click on Help - Contents and index
Then Search and enter RadioButton
Click on the first item - Using Radio Buttons
The fourth highlighted line is "Set the Value of the Radio Button Group Dynamically"

Mark
May 18, 2010, 05:54 PM
Waz
Its a pity that the internal Maintain scripts that drive the winforms are not visible.

If you could see them, then all you need to do is check which properties can be accessed.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!