Radio Buttons - Powershell - powershell

I have created a Power Shell form which allows me to input users into a text box and mark whether I want to add/remove them from a particular group. Now, I have grouped all of these into a single group.
How can I still group my radio buttons, but allow for multi select?
For example,
In input box 1, I want to add a user.
In input box 2, I want to remove the user,
In input box 3, I want to add a user.
So I'm not wanting to select Add and Remove for the same input box, just one selection per input box. Hope that makes sense and all help is appreciated!

Put each two radio buttons for a group in a container object like a Panel or a GroupBox. That will automatically group them together.

Krisz's answer is right, you need to group them. When they all sit on the form they are all in one big group and only one can be clicked.
here is a snippit of code I have where I did this as part of a sample, hope it helps:
$MyGroupBox = New-Object System.Windows.Forms.GroupBox
$MyGroupBox.Location = '195,66'
$MyGroupBox.size = '133,122'
$MyGroupBox.text = "Group of radios"
$MyGroupBox.Controls.AddRange(#($GroupRadiobutton1,$GroupRadioButton2,$GroupRadioButton3))
$form.controls.add($MyGroupBox)

Related

How to display sheet(s) on dashboard using navigation?

I'm creating a dashboard on Tableau and I want to have a set of navigation buttons that correspond with the sheets I've created. When a button is clicked I want the corresponding sheet to be displayed on my dashboard instead of navigating to the sheet itself. I want all of the sheets to be displayed in the same place on my dashboard. For example, If button 1 is clicked I want sheet 1 to be displayed on my dashboard. If button 2 is clicked I want sheet 2 to be displayed on the dashboard in the same place. I'm new to Tableau and would appreciate any help with this!
The easiest way to achieve this is using parameters.
As a first step you need to creat a parameter with a list of values matching the number of worksheet, like: Worksheet 1, Worksheet 2, etc...
Then you have to create N calculated fields in order to check if the "actual" worksheet is the one "selected in the parameter", using "ok" and "ko" as results for your filters, keeping just "ok".
The formula could be something like this (assuming you're doing the CF for the 1st worksheet, and the other ones differ just for the value):
if parameter = 'Worksheet 1' then 'ok' else 'ko' end
Doing so, all you're worksheets will present data just one at a time because all of them but the one matching the valus in parameter will be blank.
Then you can create your dashboard putting a vertical (horizontal as well if you like) container in it which will be the the "place" where you'll drag all your worksheets.
Be sure to NOT modify the spacing and height of them; just le tableau handle that for you, otherwise the trick won't work.
Once you're finished you will end up having a container with N worsheets in it, with just one of them dysplayed at once.
Once you'll become familiar with parametr actions, you will no longer need to have the parameter displayed on the dashboard (show parameter) because using a worksheet connected to the parameter values you will be able to decide the value of the parameter via click on your additional worksheet acting like a series of button (woeksheet 1, worksheet 2, etc...)

LibreOffice: how to make a Radio Button group

In a LibreOffice Writer document, how do I make a radio button group? I cannot get my buttons to "group".
I'm using LibreOffice 5.3.4.2 (x64).
I place multiple Radio buttons controls in my Writer document.
I select two buttons and, in the controls' Properties, I assign them the same Group Name.
I select two other buttons and assign them their own, same Group Name.
Example:
"Do you like dogs? O Yes, O No." (These would be the "Dogs" group)
"Do you hate cats? O Yes, O No." (These would be the "Cats" group)
I export the PDF as a form and open it in Adobe Acrobat.
The buttons are there, but the groups are not separate. The groups are not mutually exclusive and even within a group, the options are not exclusive.
The problem is probably in the naming of the individual buttons or the group but the solution eludes me. Consulting Mr. Google hasn't helped.
Any help?
SOLUTION:
Set each radio button in the group to the same NAME. Leave the GROUP NAME blank.
Then "Export to PDF..." as a form and the buttons will work as expected.
Speed tip:
Quickly select all buttons to be grouped by holding SHIFT while clicking each button. With the group selected, Right-click to display the context menu. Select "CONTROL..." and enter your values in the fields.

Excel Form VBA Combobox reset

This should be easy but I can't seem to find anything to solve. I have a Form in Excel using VBA. The Excel sheet has four columns populated with data and the Form displays those fields.
The user then selects a value in a combobox, uses a command button to submit the responses and the values from the combobox are written to the Excel sheet.
The user then uses a command button to advance one row down in the spreadsheet and load the four values from a new row. This all works great.
The issue I am trying to solve is that the combobox remains selected to the value in the prior selection. I'd like to reset the combobox so nothing is selected and the user has to make a selection again for the next row.
Below is the code I am using to load the combobox and to set a variable for what the user selected. Can't seem to get the combobox back to it's default state after the user has submitted the form.
Private Sub cbDesAccWanted_Change()
Select Case cbDesAccWanted.Text
Case "Yes"
desacc = "Yes"
Case "No"
desacc = "No"
End Select
cbDesAccWanted.Text = desacc
End Sub
Private Sub cbDesAccWanted_DropButtonClick()
cbDesAccWanted.List = Array("Yes", "No")
End Sub
There are two ways to reset the combobox. Take your pick:
1
cbDesAccWanted.Value = Null
2
cbDesAccWanted.ListIndex = -1
the line
cbDesAccWanted.Text = desacc
is totally unnecessary.
Using cbDesAccWanted_DropButtonClick is not the right place to populate the list of values. This list should be set up when the form is first shown to the user.
(unelss the values it shows chnages in which case change it when the row changes or something, not when the user clicks on it)
So when theuser clicks the down arrow to move to thenext record include the following line
Me.cbDesAccWanted.text = Me.cbDesAccWanted.List(1)
Note (1) access teh 2nd item in the list which is No.
So this reset it to the default value of No.
Ok.

Jface Text with predefined input and suggestion for user

Problem Statement:
I as a user needs text box that selects from one of the existing options that is pulled from database and also give suggestions as the user is typing in the text box.
Possible Solution:
I know one possible solution is combo box but I do not user to have a large dropdown every time he wants to input in a text box and at same time I need user not to add new value. Also I want user to have suggestions for user from possible input values.
You can use AutoCompleteField to add automatic completion suggestions to various types of control such as Text.
For example:
String [] proposals = .... array of completion proposals
Text text = new Text(parent, SWT.BORDER);
new AutoCompleteField(text, new TextContentAdapter(), proposals);
As the user types in the text field matching proposals will be shown in a drop down. They can select the one they want or just continue to type.
Use ComboContentAdapter instead of TextContentAdapter to make this work with a Combo control.
You can also use ContentProposalAdapter if you need more control of the proposal behaviour, AutoCompleteField just provides a simpler interface to this.

how to hide and unhide authoerable tabs depending upon value selected from a drop down in CQ5

i am trying to create a footer component in CQ5, where i have 4 columns & all are autherable.
But we have to make no of columns autherable too i.e based on a value selected form a dropdown we have to open those many tabs for authoring those many columns only.
i have created a dropdown and have a maximum range of 6 columns. i know that i have to configure a listener for this purpose but don't know how . Requirement is like if i select 3 from the drop down then 3 tabs should come to author 3 columns
pls help me , i am middle of something very important.i need the solution very early too as i have to finish the job as soon as possible
I might be late for this by now but in case you still need it:
You need to add a listener node before closing your drop-down element:
<listeners
jcr:primaryType="nt:unstructured"
loadcontent="function(box){ //here you also need to handle the hide/unhide when the panel loads for the first time. Use this.getValue() to retrive the intial value }"
selectionchanged="function(box, value) {
for(var c=1;c<=value;c++){
this.findParentByType('tabpanel').unhideTabStripItem("tab"+c); // You need to handle the opposite with hideTabStripItem("tab"+c);
}
}"/>
Then on both "loadcontent" and "selectionchange" (these are events on your drop-down) grab the current selected value and use it to hide/unhide the tabs. In this case the tabs would be named "tab1", "tab2", etc, make sure you get the names right.
The ExtJS in the events is finding the "tabpanel" container for the whole dialog, and then hiding/unhiding based on name. You could also set to enable/disable using the methods ".enable()" and ".setDisabled(true)". Just make sure you get the reference to the tab first if you want to do this (something like ".getComponent(tabName).enable()").
I didn't test this specific code, I couldn't find my actual example from my code base but this should take you in the right direction.