In radio button group, how do you set up an if else statement if the user didn't select any answer and just clicked on the Show Me the Answer button? If he didn't select any answer, the correctRect (a rectangle to highlight the text) must still show up but not the wrongRect (right now the wrongRect shows).
Related
I have been trying to set mandatory dropdowns to be selected in order to go to the next screen.
Next screen is called End
Dropdown is called type_4
This is the code that I used but it doesn't seem to go through:
If(
IsBlank(type_4.Selected.Value),
Notify("Fill all the fields to continue", NotificationType.Error),
Navigate(End,ScreenTransition.Cover) )
This issue is specific to dropdown inputs. If it was a text field all I do is replacing Selected.Value by Text and it works fine.
Dropdowns are my only problem so far.
EDIT: The default value of the dropdowns is Select your answer (first choice of the dropdown).
If the default option for your dropdown is 'Select your answer', then you can use an expression similar to the one below:
If(
type_4.Selected.Value = "Select your answer",
Notify("Fill all the fields to continue", NotificationType.Error),
Navigate(End,ScreenTransition.Cover) )
I have implemented the navigation pane feature in Power BI report as shown below. I like to expand or collapse this navigation pane to utilize page for visuals.
Is there any visuals/tricks to do this?
You can save your report/page layout as a bookmark (Menue Bar > View > Bookmarks Pane) with the navigation pane visible (NavigationVisibleBookmark).
You can trigger visuals visible/invisible with the eye symbol in the selection pane (Menue Bar > Views > Selection Pane`).
Then save another bookmark with the navigation pane invisible (NavigationInvisibleBookmark).
Now you can trigger the two different bookmarks with a button for example. Add a blank button and go to the Properties > Action and choose Type = Bookmark and Bookmark = NavigationVisibleBookmark.
I have a wxTextCtrl object and set it to be autocomplete
wxArrayString _myStringArray;
_myStringArray.push_back("abc");
_myStringArray.push_back("alpha");
_myStringArray.push_back("bnm");
_myTextCtrl->AutoComplete(_myStringArray);
I type char 'a' into it. And then a popup shown with a list of related/suggested strings (i.e "abc" and "alpha"). Now I press 'down arrow key' in order to select a string. The first time I press the button the "abc" string is selected. The second time I press the button the "alpha" string is selected.
The problem is changing the string selection by pressing UP and DOWN arrow keys doesn't change the text control value. I want the text control value to be updated when the selected string changed by pressing UP and DOWN arrow key.
I thought I could do that manually if I know the event name. So the question is: what is the event name (or event macro) of changing string selection from a popup in a wxTextCtrl by pressing UP and DOWN arrow key?
Thanks
update: I am succeded on capturing KEY DOWN event by subclassing wxTextCtrl and then add an event handler for EVT_KEY_DOWN event.
void TextCtrlChild::keyHandler(wxKeyEvent& event)
{
int _keyCode = event.GetKeyCode();
if(_keyCode == 315 || _keyCode == 317){ //if UP or DOWN arrow key is pressed
//TO DO: capture the highlighted string from the popup
}
event.Skip();
}
Now the question is how to capture the selected/highlighted string from the popup?
The way autocompletion works is dictated by the system UI conventions, so it doesn't look like a good idea to interfere with it. If you really want to have immediate selection, consider using another control, such as wxChoice, instead.
I have a dialog list which use Use View dialog for Choices.
I have a row in a table which its appearing depends on the value selected from that dialog list. ( I am using Hide when formula... ) The form has Automatically refresh fields checked.
The problem is that after I select a certain value from the dialog list, and I even had selected Refresh fields on keyword change property, I MUST hit F5 or just TAB ( to go to a next field ) in order to make that row table to appear. I also tried to add uidoc.Refresh at the Exiting/OnChange event(s) of the dialog list.
I have noticed the following:
the refresh works fine for combo box, list box, radio button or check box
the refresh works fine for dialog list where you are using a list of choices / formula.
the refresh doesn't work for dialog list where you are using view dialog for choices ( my case ).
Is there any solution for this issue? I want when I selected a value from the dialog list, immediately the row / line should appear/disappear.
Thank for your time!
I'm trying to add a menu to a CMFCToolbar. Following advice I found online, I'm doing it like this:
CMenu m_Menu;
m_Menu.LoadMenu(IDR_MYMENU);
m_Toolbar.ReplaceButton ( ID_DOTHISWHENCLICKED,
CMFCToolBarMenuButton( ID_DOTHISWHENCLICKED,
m_Menu,
10,
nullptr,
FALSE));
So the above gives me a button with a drop-down arrow. When I click the button, it does the action ID_DOTHISWHENCLICKED. When I click the drop-down arrow, I get a menu with one item in it. The item is the title of IDR_MYMENU and this has a sub-menu that is the menu I would like to be displayed. Something like this:
[BUTTON]
My Menu
Submenu Item 1
Submenu Item 2
Submenu Item 3
Obviously what I want to see is:
[BUTTON]
Submenu Item 1
Submenu Item 2
Submenu Item 3
So my question is.... why aren't all of the menu items in IDR_MYMENU in the menu, instead of being in a sub-menu off of it?
Thanks.
This problem is fixed simply by passing in .GetSubMenu(0)->GetSafeHmenu(), instead of the CMenu in question, when creating the menu button. Why this should be so is a complete mystery to me, and one of those MFC'isms that you know if you know.
Not sure whether to delete this question or tick it solved in case anyone else ever has this issue.