Deselecting radio buttons - c++

I am creating an application in which i use different group box for different categories which contains radio buttons for items.But if i select an item from one group box and then from another group box,the item in previous group box remains checked. But i want that whenever i select an item from different group box all other item must get deselected.
Can anyone help me with this regard??
Thank you.

Radio buttons with different parents will behave as separate groups so the radio buttons will all need to have the same parent. You could overlay group boxes by positioning group boxes over the radio buttons but this will be problematic if you are using layouts. An alternative is to just separate the groups of radio buttons you want to distinguish by using labels or line separators.

Group all the buttons together with either 1 group as parent or something else like the form, just have them in the group boxes visually.

By default, radio buttons will only be exlusive between those with the same parent. However, there is a simple solution to this. A QButtonGroup can be used to specify which buttons are related. Your solution would be to create your own button group, then set that group on each of the radio buttons you would like to be mutually exclusive.

Related

Apex: 22.1.1 - Based on the selection of the radio groups the form must be displayed dynamically

I am a newbie to APEX. I am currently working on radio buttons.. There are radio button groups in my page 1. For example :Radio 1 and Radio 2.Based on the selection of the radio button in these 2 groups , I need to dynamically show a Page items of the region in the same page. For a particular selection of the radio button groups, certain page items will be visible and certain will be hidden.
Also based on the values entered in the page items, on submit,the next page must display all the values which I entered in the region of the page elements.
What should be my approach to this. Please guide.
enter image description here
The way you described it, you'd use dynamic actions (Show / Hide) because they let you "dynamically" (and immediately) manipulate other items on the page.
You could use Server-side conditions as well, but they require page to be submitted first so - I guess that's not what you're after.
Therefore: initially hide all items you don't need (that's the same dynamic action, just set it to fire on initialization, i.e. when page is first rendered), and then show them as radio buttons' values change.
As of your next question: if you navigate to the next page using a button (so its action is to "Redirect to page in this application"), you can set next page's items' to values of items on this page. To do that, use Target - Link builder property (right below "Action").

How do I remove this selected shape?

So I have created a shape using items and then added those items to a QGraphicsItemGroup. The group is set with the flags movable and selectable. My issue is I cannot find a method that allows me to remove the group and all the items in it when it is selected.

In MFC how to select multiple items in the Combo-box?

In MFC dialog based application, I have a combo box. Is it possible to select multiple items in the Combo-box through mouse and keyboard operations and also by pro-grammatically?
m_ctrlComboBox.AddString("Type1");
m_ctrlComboBox.AddString("Type2");
m_ctrlComboBox.AddString("Type3");
How to achieve it?
From the documentation:
A combo box consists of a list and a selection field. The list presents the options that a user can select, and the selection field displays the current selection. If the selection field is an edit control, the user can enter information not available in the list; otherwise, the user can only select items in the list.
The selection field is only capable of displaying a single selected item (at most). There is no way to allow a user (or code) to select multiple items at the same time. This is immediately obvious when looking at the CB_GETCURSEL and CB_SETCURSEL messages, that only allow for a single index to be passed.
A list view control allows multiple items to be selected at the same time.

Get the index of the selected radio buttons

I have 4 radio buttons on my dialog and all are under one group.
In order to group them i have set the group option to TRUE for the first radio button and FALSE for the rest of them.
I have given the tab order accordingly.
As i grouped them together, i can only create one member variable for the entire group lets say it is m_RadioGroup.
I have "Ok" button on my dialog. Now on click of OK button i wanted to know which radio button is selected out of 4 of them.
How do we achieve this?
You can't use only 1 variable for 4 item.
Every item should have its own variable. Then witch a switch-case or something else find the radio button selected.

Can we hide row in win32 listview

I am using win32 listview control. My requirement is to hide a certain number of rows from listview but I could not find any flag by which I can hide the row item in listview.
I try creating a group and try hiding one the group but the LVGS_HIDDEN flag is not working as well.
I am looking at the documentation from below link http://msdn.microsoft.com/en-us/library/windows/desktop/bb774769(v=vs.85).aspx
Also If the hiding of the group is not working, it is possible to move row item from one group to another group.
The LVGS_HIDDEN flag will only be applied if LVGF_STATE is set. An item's groupid can be changed by the LVM_SETITEM message.