Infopath option button control - modify button count - infopath

I have an InfoPath Option Button control on a template and need to add an additional option button to the control. Any ideas would help.

Do you mean programmatically or you just don't know how to add a button to an existing group (since the default is to create a new group)?
If you just want to add another button to an existing group the easiest way is to copy one of the existing buttons and paste it. Then double click (or right click and select) to go to the properties screen and change the "value when selected".

Related

Looking for a vb.net code to add existing buttons/text boxes/drop down lists, etc. to a container, or holder?

I'm using vb.net. Basically, I have a drop down list, text box and a submit button. You choose a movie director from a drop down list, then type in a movie, click button and it adds the data to my database.
There's another button which hides/shows drop down list, text box and submit button using Visible = True and Visible = False, but what I don't like about it is when it hides the things I said before, it leaves some white/empty space like if they are still there, but not visible.
Is there anyway to put some kind of holder/container and place a button which when clicked could add my drop down list, text box and submit buttons to that place?
Cheers,
E.N.
I assume that you are working with WinForms in Visual Studio. In the Toolbox the controls which could help you out of this situation are in the "Containers" section. Among others, there is a Panel, a FlowLayoutPanel and a TableLayoutPanel (see this video on msdn for a TableLayoutPanel Demo). They can help you to organize controls. Especially the FlowLayoutPanel places the controls automatically. But you can always change the Top and the Left properties of any control, to move them around to the desired place or group some of them on a Panel and change the Location of this one one.
You can add a control to a container by using the Add method of its Controls property. However, if the control is already on the form (since you are asking how to add an existing control) you must remove it from the form before.
Me.Controls.Remove(myButton)
panel1.Controls.Add(myButton)

JqGrid ask for new fields on click custom button

I have added a custom button to the navigator in my jqgrid and i am wondering how can i ,when i click on the button, show a dialog with the same style as the edit dialog and ask for some especific fields that are not included in the colModel. Those field would be to be sent to the server when clicking on ok button.
Any ideas?
Thanks in advance.
Carlos.
You can display the "Edit" dialog using editGridRow method. In the second (properties) parameter of the method you can include your custom beforeShowForm event handler which can make any modifications in the dialog.
See last demo from the answer for an example. The demo has the line
$('<tr class="FormData" id="tr_AddInfo"><td class="CaptionTD ui-widget-content">'+
'<b>Additional Information:</b></td></tr>').insertAfter (nameColumnField);
inside of beforeShowForm.
If the information which you need to show in the dialog are from the hidden column of the grid you can use simplified way which you find here. The main idea in the solution is that jqGrid include in the form dialog all hidden fields, but the corresponding row is hidden. So it is enough just to show the hidden row.

Qt:creating a dynamic button

I want to create an application in which i will create a button and by pressing that button as list of options will open and i can choose one of them.for example i will create a button named "searching algorithm" and by clicking this button a list will open at same place which display two options as linear search and binary search.can anyone give me an idea how to do that?
You want a QComboBox:
The QComboBox widget is a combined button and popup list.
I believe what you need is a popup window where you can have list of options, whenever your button is clicked show this window, hide it when user selects an item in the list or clicks outside of the working area. There is an example you can use as a reference:
QT 4.7 Google Suggest Example
hope this helps,
regards

create components dynamically

I have requirement in AdvancedDataGrid.
In Advanced Data Datagrid with columns checkbox,textfield, textarea,button,radiobutton. and ADD Button and SUBMIT Button. When i click on ADD Button, those above all fields are need to add dynamically in next row.If i click 10 times on ADD Button, 10 rows with all above fileds need to be added.
If Have any sample code please forward to my gmail id:rkcy000#gmail.com.
You should work with the underlying data provider for the adding of new rows. whenever the add button is pressed do
adg.dataProvider.addItem( newItemFromAboveRow );
and the ADG will sort out the display for you.
Create custom item/row renderers. More Using Item Renderers and Item Editors

Is it possible to catch a comboBoxes value before change with a change event

I am displaying a combo box in something of a WYSIWYG preview. I want the user to be able to click on the combo box and see the options inside, but I don't want them to be able to change the value. I tried using preventDefault() on the change event but it doesn't work. I don't want to disable it because I do want the user to be able to "look inside" the dropdown.
So I'm trying to block the change, but can't. My next resort is to change the selected index back to what it was before the change, Is there any way to do this within the scope of a ListEvent.CHANGE event listener?
Current Workaround is to basically re-assign the controls selected item the same way I am defining the selected item when I originally build it (a default selection). So a user sees their change then it immediately changes back to the default selection.
Are you sure that a combobox is what you want? could you do the same thing with a list component that is not selectable?
update:
If you must use a combobox and you dont want the lag from listening for the event and resetting the control, I see two possible options. You could subclass the control and make your own. When you do, hijack any methods that set the value besides the initial selection.
Or, you could try something like this: http://wmcai.blog.163.com/blog/static/4802420088945053961/. The site seems like it is in another language but the code is still there. It will allow you to make your options disabled, so the user cannot choose one of the other options.
HTH

Resources