How to enable multiple row selection by mouse in gtk.glade treeview? - treeview

How to enable multiple row selection by mouse , I use :
selection.set_mode(gtk.SELECTION_MULTIPLE)
but the multiple row selection is enabled only by keyboard (shift + arrowup/down)

The option is called "Rubber Binding" , present in the properties > general tab, the default is "no", I just sign it to "yes" - it works fine.

If you use SELECTION_MULTIPLE, you need to use signal name "selected-rows-changed".
eg.
widget.connect("selected-rows-changed", your_callback_method)

Related

(Lotus Notes)Can the labels in the form set display conditions?

There is currently a form, suppose there are two labels, I want to have a field with a value for the label ex2 to appear, if not, hide the label ex2.
Is there a place to set it?
After I tried, the tab still visible...
In the Designer :
In the Client :
To hide a TAB you simply hide its contents. If you e.g. would want to hide ex2 you would select the complete content of the tab", open the text properties (Alt + Enter) and enter something like:
HideEx2 = "Yes"
in the hide- when formula. Then the tab will disappear as soon as the field "HideEx2" gets the value "Yes".
Take care: Hide whens are NOT calculated "automatically". If your Hide- When depends on the value of an option or checkbox field you need to check the mark "Refresh fields on keyword change" in the field properties of the HideEx2- field.
Otherwise your user needs to press F5 or save the document to make the tab appear / disappear
If there are Tables in the tab, then you need to do three steps:
select everything before the table (red BEFORE in the screenshot), set the hide- when
select all cells of the table, set the hide when
and at last select the text after the table (red AFTER in the screenshot) and hide it.
3 different selections, 3 times setting the checkmark, 3 times inserting the hide when! You CAN'T do it in one step, it's not possible to select a table AND its surronding and set the hide when for everything at once. You can select it, but hide when will only be set for some of the stuff.
If there is one single line that is not hidden in the tab, then it will be visible.

Not having any filter automatically in document Qlikview

I have a document QLikview and I want when I launch it not having any filter , clear automatically without click on any button.
Is it possible ?
Thank you
Yes it is possible.
Settings --> Document properties --> Triggers --> if "OnOpen (Has Action(s))" ---> select OnOpen --> press Edit Actions button on the right --> review the actions that are triggered when the document is open. If "Clear All" is present you can delete it if you want to change this behaviour.
if there are no triggers in the document properties check the macro module ( Ctrl + M) and review the vbscript ( if available ). Part of this script should clear the selections.
another option is selections to be cleared on activating the specific sheet but i highly doubt that this is your case

Going to Specific tab in oracle forms

I have 3 radio button A ,B, C
and I have 3 tab page in the canvas A, B,C.
My Requirement is if user select radio A and press Submit button then tab A Should get activated and my cursor got to tab A.
If it is enabled and visible then you can use the following commands:
go_item('blockname.itemname');
or
go_block('blockname');
If you don't need to go to a specific item then use the second command go_block.
To enable a tab page:
set_tab_page_property('TAB_PAGE_NAME',enabled,property_true);
If the tab page was not visible you should make it visible first:
set_tab_page_property('TAB_PAGE_NAME',visible,property_true);
In order to navigate to that tab page, the easiest way to accomplish that is by going to a navigable item that is in that tab page:
go_item('ITEM_IN_THE_TAB_PAGE');
First you have to set the tab page as top most using set_tab_page_property(top_most_tab_page,'tab_page_name'). after that use go_item('block_name.item_name');
here is the easiest way to do this
In the following code, I supposed that the radio button name is: RADIO_BTN and it's value is 'A'
open submit button properties and set 'keyboard navigation'= No and 'mouse navigation'= No
on tab A create a dummy item (not database item) and name it A, with width=0 and height=0 so the user will not see it, or use a real item name on tab A
open trigger when_button_pressed on submit button and write the following code.
IF :RADIO_BTN = 'A' THEN /*replace this with your radio_btn name and value */
GO_ITEM('A'); /*go to dummy item in tab A or to real item in tab A */
END IF;

Is it possible to disable one of the options among a group of radio buttons?

I have a radio button control with two items in it.
<xforms:select1 ref="add-delete" appearance="full">
<xforms:item>
<xforms:label>Add</xforms:label>
<xforms:value>A</xforms:value>
</xforms:item>
<xforms:item>
<xforms:label>Delete</xforms:label>
<xforms:value>D</xforms:value>
</xforms:item>
</xforms:select1>
I want to disable only the radio button 'Delete' and not the radio button 'Add' on condition X. How can I carry out this ?
I tried using class attribute with xforms:item but that is not working. Is there any other way to do this ?
Good question. And unfortunately, this isn't as easy to do as it should:
If you just wanted the delete radio button to be hidden, instead of disabled, you can replace the <xforms:item> for the "Delete" by an <xforms:itemset ref="…"> that you bind to a node which you make non-relevant when you want that radio button not to show. But you can't use that same technique to disable the radio button by binding the itemset to a node you make read-only. (And yes, it would be good if you could do that.)
As it stands, I think you'll need to:
Create 2 <xforms:select1>. One for "Add", one for "Delete", so you can make the second one readonly upon some condition.
To make it readonly, but not have the "Add" be read-only as well, you need to bind them to 2 separate node.
If you want to have 1 node with either A or D, you need to create a calculate to populate that node based on the 2 values.
You want the values to be exclusive, and they won't be if you have two <xforms:select1>, so you need to deselect "delete" when "add" is selected reacting to xforms-select, and vice versa.
In the model, you would have:
<xforms:instance>
<instance>
<add/>
<delete/>
<add-delete/>
<delete-enabled>true</delete-enabled>
</instance>
</xforms:instance>
<xforms:bind ref="add-delete" calculate="string-join((../add, ../delete), ' ')"/>
<xforms:bind ref="delete" readonly="../delete-enabled = 'false'"/>
And in the view:
<xforms:select1 ref="instance()/add" appearance="full">
<xforms:item>
<xforms:label>Add</xforms:label>
<xforms:value>A</xforms:value>
</xforms:item>
<xforms:setvalue ev:event="xforms-select" ref="instance()/delete"/>
</xforms:select1>
<xforms:select1 ref="instance()/delete" appearance="full">
<xforms:item>
<xforms:label>Delete</xforms:label>
<xforms:value>D</xforms:value>
</xforms:item>
<xforms:setvalue ev:event="xforms-select" ref="instance()/add"/>
</xforms:select1>
And see this Gist for the full source of this example.

MFC separate groups of radio controls

I have added 8 radio buttons in my dialog layout in the resource manager, but I am having trouble separating them into 2 groups of 4 buttons. I have attempted to add a control variable, but I don't see the option of CButton available in the drop-down menu in the wizard. What would be the easiest method to accomplish this goal?
Make sure the first control in each group has the "Group" and "Tab Stop" attribute set.
Make sure that the control following the last radio button in each group has the "Group" attribute set.
Make sure that all the radio button IDs in each group are consecutive integers.
Create an integer member variable for each group
In the DoDataExchange method for the dialog add a DDX_Radio statement for each group linking the integer variable to the first ID in the group.
The integer variables will be set from the radio buttons whenever UpdateData(true) is called (called automatically by the default OnOk() handler) and the radio buttons can be set from the variables by calling UpdateData(false) (happens automatically in the default handling of OnInitDialog)
This problem is not a MFC problem, but a WIN32 radio button problem.
When creating the groups, the tab order (creation order) matters. You have to create them in order of the first group then the second group. The fist radio button control in each group has to have the "group" style selected.
You should be able to create the radio buttons in the Visual Studio dialog editor and run the Test Dialog and it radio groups should work ok within the two groups without any code at all. If they don't then you have done something wrong.
I found this using google which may help you.

Resources