How to get drop-down menu in FLTK? - user-interface

I am making a GUI with FLTK and I am wondering if there is a widget for something resembling a drop-down menu. I want one value to be shown, then have the user click the value (or something else associated with it), then a list of values be shown for the user to select one from, then the list collapse again. I have been unsuccessful finding documentation for a widget that can do this so I thought I would ask. Any help is appreciated.

I believe you are looking for FL_Choice.

Related

What are the accessibility considerations for confirmation buttons in modal dialogs?

Consider a modal dialog where a user can select an item from a list.
Option 1: Instantly close the modal upon selecting an item from the list.
Option 2: Have a selected state for the selected item and provide OK / Cancel buttons to confirm the selection before closing the modal.
Which of the two options is preferred from an accessibility standpoint? (considering keyboard navigation support, etc). Note that the selection is non-destructive and the user could easily re-open the modal and change the selection.
Option 2 is your best option here is some guidance related to this and the WCAG guideline
Basically do not change context, update lists etc. automatically on any type of input, you should always give the user a chance to confirm their actions.
Now the question is do you really need a modal if all the user is doing is selecting an item from a list?
Surely it would be a better UX to just have a list you can choose from (this depends on what you are doing, just thought I would point it out as you didn't give an example).
You also need to consider the fact that your modal list should present number of options, currently selected options etc. etc. Yet again these are just guesses and something to consider, it could be irrelevant.

MS Access trying to link a record with a page tab

I've been searching for a few days and doing every word combination I can think of to try to find the answer to my issue. I'm hoping someone can help me.
Before I begin I'd also like to say I'm very new to Access and admittedly not great with it. I'm still learning so this could be a very easy fix or I may have messed up beyond belief.
The issue I'm having is I've setup several page tab on a form and entered all the information for my records. However I cannot get the page tabs to pull up the corresponding records. Instead I have to either search through the records which doesn't always work or I have to arrow to the right record after selecting the tab I want. I'd like it so that when I click the tab it brings up the proper record automatically. If someone can point out where I'm going wrong and how to fix it I would greatly appreciate it. See below for some pics of what I mean.
As you can see in the first image. The tab name "Auto PLUS" doesn't bring up the proper record. instead I have to manually change the record using the arrows at the bottom of the form (see the arrow at the bottom of the image) in order to change the record. I need the record and the tab to match. Any help would be so greatly appreciated.
Thanks in advance for any help!!
-Deke
Assuming your form is bound (if in design mode your fields do NOT say "Unbound" then your form is bound), you simply need to add some VBA code to each tab's OnClick event.
Enter design mode and select the first tab "Claims Other". Open the properties pane, click the event tab, and click the ellipsis at the end of the OnClick line. When prompted, select "Code Builder" and it should launch the Visual Basic Editor.
It will put your cursor automatically in the correct position. Copy/Paste:
DoCmd.GoToRecord acDataForm, Form1, acGoTo, 1
The 1 should correspond to "Claims Other's" proper record in your table. Use the row number, not the ID number to determine what it should be.
Go back to Form View and click on the "Claims Other's" tab. The data should show the corresponding record in your table.
Repeat the steps of adding events to each tab, finding the relevant record in your table, and replacing the 1 from the above code.

How to delete from a combobox

Say you had a combobox like this one:
How would one allow the user to delete an entry listed in the combobox? What element would you add, such as an additional button, context menu ...?
I think small 'x' mark at the right side would be sufficient here.
However I think better solution is to use something like select2: https://ivaynberg.github.io/select2/
.
I believe users are more familiar with this kind of input.

How to call an event when the user "finally" selects an item in a list?

When a user clicks once on an item in a Grid or a ListBox, that item is usually selected, hence most UI frameworks have a onSelected event or the like for that.
However, how can we generally call the next step when a user "finally" selects an item by e.g. double clicking an entry? You know when some popup might appear in the context of the selected item and the user can do further stuff.
Strangely enough, I think I have never seen a word for that in any UI framework.
onPicked, onAccepted, onChosen, onFinallySelected, onResult? All kinda awkward or too special. Any other ideas?
I haven't found anything wrong with SelectionChangeCommitted
The wxWidgets framework uses the term activated to describe what you're talking about. So, the method could be called onActivated.

How to implement a Chained menu in PHP?

I want to have a AJAX Function of implementing a chained menu + a result table.
What i need to do:
Firstly, the page populate automatically a vertical menu from MySQL and a result table.
Secondly, when i click an item in the menu, it displays a submenu in a fixed area in the page and a new result table.
Thirdly, when i click an item in the submenu, it displays a sub-submenu in another fixed area in this page and a new result table.
Last, when i click an item in the sub-submenu, it displays a result table.
All the result tables are in the same position. It changes depending on the click in the menus.
I'm lost in how to do that. Do you any ideas about how to implement this? Thanks so much.
Edit:
The effect is a little like this: effect
Your First, Second, Third, Last very much looks like visualjquery.com
I believe it is written in Javascript+jQuery, so you could learn from its source.

Resources