I am using a database in Shiny App. I have created a long list of choose button to select multiple option (since I have to select more than one option). Problem is, the main screen (for user ui) is becoming very large. I have more than 20 options in couple drop down.
Can't I select more than one option in select drop down list? Since it will reduce the overall size of main user ui screen.
Note- I wanted to post the image of what I have created, but don't know how to paste the real image. I tried but it was taking the link.
Thanks Jdharrison for your response! Actually I don't want to add them horizontal. My question is is it possible to select more than one option in drop-down list? So far I think, we can select only one option from drop-down.
By drop down list, you mean selectInput()? If that is the case, you can certainly do multiple choices using selectInput(..., multiple = TRUE).
Related
I am using checkbox group as a tool for a user to select some parameters. The things displayed in the checkbox group is dynamic based on files some one uploads. I can get the selected checkboxes, but sometimes, the user needs to select them in a specific order, and shiny will only allow one order, the way it currently is. I'm not sure how to go about doing this, or if there is a widget in shiny that can do this for me. Thanks.
I have in my application a larger textbox and offer user the possibility to enter text on several rows like this:
first piece of text
second piece of text
and so on...
Each row is a distinct piece of data that has a significance. The thing is I would like to use ajax auto complete extender functionality after the user types a certain character on a row, such as #, and filter the records in the database according to the first letter the user typed after #, moment when the auto complete suggestion list would appear. For example, third piece of text #Action1, means that after the user typed A he would be prompted with a list of values to choose from.
There are several items of concern for me: first, it is possible to use autocomplete extender only for part of the text in the textbox, and second does it work like this for multiple rows (i.e. one time - in each line behaviour)? Regarding its position, I guess I have no other choice than at the bottom of the textbox it refers to, despite I would have liked it to appear below the # symbol.
Thank you very much.
Update: I found something similar to what I am looking for here: Twitter-style autocomplete in textarea, but the author only explained briefly his solution. Any help much appreciated, thx!
Each row is a distinct piece of data that has a significance.
Why are you using a textarea then, and not multiple <input> fields?
Sounds to me like your error in UI design lies right there already, so the rest of my answer is rather theoretical; I probably won’t go into more details as the sensible fix for your problem is the one above.
first, it is possible to use autocomplete extender only for part of the text in the textbox,
Why shouldn’t it be? Cursor position in a textarea for example is readable (although it requires some working around cross-browser issues).
and second does it work like this for multiple rows (i.e. one time - in each line behaviour)?
So long as the line breaks are “hard” ones (made by the user themselves, using enter/return), splitting the actual textarea content by "\n" to have each row as a single value is no problem.
Regarding its position, I guess I have no other choice than at the bottom of the textbox it refers to, despite I would have liked it to appear below the # symbol.
You could try to roughly measure the #’s position, by line and col number it is on, and match that to the character width and line height, when using a monospace font. For other fonts, some more “magic” might be required to measure the actual width of the previous text before the # character.
I have created a Meteor package for this, which allows both free text and multiple autocomplete sources. Meteor's data model allows for fast multi-rule searching with custom rendered lists. If you're not using Meteor for your web app, (I believe) you unfortunately won't find anything this awesome for autocompletion.
https://github.com/mizzao/meteor-autocomplete
See the link for pictures of how it works. Fork, pull, and improve!
I have four different tables and I want the data from each table to be shown on four different tabs?
Create four subforms, each based on a different table. Place one subform on each tab's page. If your tables are related, you'll need to either base your main form that contains the tab control on a table or query that contains your key column.
While #Joey's answer is certainly the way to place different tables on different tabs, it can lead to a slow-loading form. In general, I prefer to have one subform control into which I can load different forms as required. The user does not see any difference, in that there is not much difference between clicking a button and clicking a tab.
Me.TheSubFormControlName.SourceObject = "frmForm1"
You can also set the link child and link master fields at runtime, if required.
Consider an ASP.NET server control DropDownList (or <input type='select'>) with a large number of options (e.g. 100 options). When clicking on the list, the full list of 100 options are shown. They're all displayed, and run off the screen.
How can the control's picklist size be resized or limited to the first n options?
Frédéric Hamidi has already given the short answer, however he has also referred you to a perfect alternative. Explore this and that is similar to what I had done when I faced similar situation.
Idea is that you don't populate your list. This way your drop down will be empty and in place of that you show a div with scrollbar and whatever you wish. Align this div in such a way that user thinks, "it is the dropdown".
I have two comboboxes:
The first one is Language (English, Italian, French...) and the second one is another list of stuff that is different for every language (or a little bit different) so the content must be loaded every time the language is changed.
How can I handle it?
Example:
If I select English, in the second combobox I have: Red/Purple/Black
If I change to Greek, I have: Red/Purple or Red/Pink...
I am using Qt Designer, and I have two Comboboxes with all the possible Items in both of them.
Regards.
Yes, it is possible. My recommendation would be to go one of two ways.
1) Split the second combo box's items into many combo boxes, each on their own page of a stacked widget. Change the page of the stacked widget that is visible based on the selection of the first combo box.
2) Split the second combo box's items into many models, and set the appropriate model on the second combo box based on the selection of the first combo box.
If you want to get fancier and have the space for it in your UI, you could also consider putting all of the data into one tree model and using a QColumnView.
Well, finally I did what I wanted.
Here the code:
void reloadItems()
{
QString currentLanguage;
currentLanguage=ui.ownLangComboBox->currentText();
if (currentLanguage=="English")
{
ui.ownGendComboBox->clear();
ui.ownGendComboBox->addItem("Male");
ui.ownGendComboBox->addItem("Female");
}
}