In B4A, it is possible to add radio buttons to a parent (or group them) - such as a panel, instead of using designer? I have used addview to add 3 radio buttons to a panel but no luck.
I was using designer and then decided to try 100% code but I am having no luck getting them to select properly
There should be no problem adding radio buttons with code. Can you post the code that you tried?
Related
I have several radio buttons
I need to assign a radio group to it so that only one radio button is selectable at a time.There is no radio group option.I have tried
Assigning a single action outlet to all buttons
Putting all buttons in a custom view
None of this works.
In the old days, NSMatrix was the class that provided the radio group behavior. If you look up the docs for that class, you'll find the following note:
Use of NSMatrix is discouraged in apps that run in macOS 10.8 and later. If you need to create a radio button group in an app that runs in macOS 10.8 and later, create instances of NSButton that each specify a button type of NSRadioButton and specify the same action and the same superview for each button in the group.
So there are three things that all need to be true at the same time for this to work:
Your buttons all have to share the same superview.
Your buttons all have to have the same action.
Your buttons need to have their button type set to NSRadioButton.
I tried this out just now. I created a button in a view in my storyboard, set it's button type to "Radio" in the Attributes inspector, and assigned an action. Then I duplicated that button several times, and ran the app. The radio behavior worked automatically.
If it's not working for you, I'd start by doing what I did above. Just create a single radio button and set it up with an action. Then duplicate it a few times and test. If that works (it should), then either see if you can use that technique to get what you want, or look at what's different between what you want and what works.
I need to add button on TYPO3 backend list view (here for example):
Purpose of this button is similar to hidden button, I want to change flag Top News from 1 to 0 and from 0 to 1.
I have no idea where to start, I found how hidden button working but I have no clue how to add own button and work with it. If possible, please add any links to extension, which have solution for that problem, or code which solved that or anything else will be great.
Thanks!
You could use the $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/class.db_list_extra.inc']['actions']hook.
This way I added a custom toggle button and controlled the display of other buttons via TypoScript.
My aim is to create a tabbed menubar instead of the traditional menubar presented in the latest TinyMCE 4.7.6. I plan to do this by hiding the menubar, then create a toolbar above the normal toolbar. This new toolbar would consist of buttons with the menu names such as File, Edit, Insert, View etc. When one of these buttons is clicked, the normal toolbar buttons would be replaced with the toolbar buttons under the relevant menu item. [I hope I have been clear to this point.]
In case I haven't worded my description well enough, I want to create something like the Microsoft Word 2013 menu style.
Here's my problem. I am unable to create the toolbar that would host the menu buttons (File, Edit etc buttons). The TinyMCE docs say nothing about creating custom toolbars. All there is, is on creating toolbar buttons and adding them to an existing toolbar. Anyone with an idea how this can be done? Thanks.
This is quite some work you want to do, so first of all let me tell you a "ribbon" skin is already existing, check it here
Now if you really want to make your own, first you have to understand the difference between a menubar and a toolbar
On this image there is one menubar and two toolbars
Here is the documentation for the menubar API and for the toolbar this is here
But you should really give a try to the existing skin first.
I want to add a Button to a HeaderSpan in SmartGWT. At start, the title of the button will be + (Plus), when the user clicks the button, all the rows of the table are shown and the title of the Button becomes - (Minus). There are around 25 columns in the ListGrid hence I want this behaviour.
I have tried using the HeaderSpan.setAttribute("button", new Button("+")) method but it did not work. Please help.
Any other approach to hide/unhide columns will be very much appreciated.
I've watched this link. As per the overview given in the screen, it does provide hide/show of particular column as well as particular headerspan. On right side of each column a dropdown like button is given which is visible on mouse over & serves your purpose. If you want to change it's icon, you can try the following code, where headerMenuButtonIcon is the path of your image:
grid.setHeaderMenuButtonIcon(headerMenuButtonIcon);
Hope this helps you.
I'm working something like a dynamic menu, where you click some radio buttons and it shows a specific form, each radio control matches to a different form.
Examples from the showcase always base themselves on the Tabs widget and I don't need that behaviour.
I opted for placing all the forms inside one Canvas and hide/show them accordingly (Not sure this was the best idea, if someone knows better I would like to hear it)
Now my problem is that every onClick event has to .show() one form and .hide() the other 9. that is annoying.
Is there a way to "get" the current displayed child in the Canvas and hide it?
If what you want is basically mutex display, you could put all the components as members of a Layout instead of a Canvas, then use setVisibleMember(). That hides all other members.