How to set default name to GtkComboBox? - c

I want to set my GtkComboBox to have some default value/name, on it as follows:
+---------------+---+
| Image Options | X |
+---------------+---+
| Image Option 1 |
+-------------------+
| Image Option 2 |
+-------------------+
| Image Option 3 |
+-------------------+
"Image Options" will be just a Title and it will disappear once user selects any option from list. when user click on the list and selects "Image Option 3" then it will display selected value insted of "Image Options". "Image Options" will not be a part of option list.

I don't think you can. The GtkComboBox shows data from a model. You're asking it to show a piece of data that is not in the model.
If you want to change which row of data (in the model) is changed, you can use the gtk_combo_box_set_active() call. Note that it takes an integer index (model row number) though, not a string so you cannot use it to make the box show data that is not in the model.
Consider labelling the widget using a nearby GtkLabel instead, or perhaps using a pop-up tooltip.

Related

How to dynamically change columns position in a grid in extjs?

I have a grid with 3 columns ( name | lastname | age ) in that order. What I need is to change the position of the columns when clicking a button to ( age | lastname | name). Is there any way of doing this ? I did it by creating 2 grids and change them each other when the button is clicked but I was wondering if there is any way of doing the same thing with only one grid.
Here is a link how to dynamically set column order using a button. The example should help you in your quest to fill your needs.

Attribute Selector in microstrategy Dashboards

Suppose I have a dashboard with a report embedded in it in Microstrategy.
Is there any way by which I could let the user vary a single attribute while the dashboard is running.
By this, I mean, that the user should be able to choose which attribute is being displayed on the dashboard,
For instance let the report have a structure
Attribute 1 | Attribute 2 | Attribute 3
Can I let the user , through a drop down box , change this in real time to
Attribute 1 | Attribute 2 | Attribute 4
If there aren't too many options, you could set up a Panel Stack, with panels containing versions of the grid with the appropriate attribute visible.
Then it would appear that your Panel Stack selector was changing the grid (when really it's switching between different version).
Yon can use an object prompt in your report to select attributes on the fly.

How to add static text to the page layout?

Is there a way to add static text to Page Layout? I need to provide instructional text on pages and can't see another way to achieve this
You can accomplish this in couple of ways.
Create a VF page with the static text and embed it on Page Layout
Define Field-Level Help (to add message to fields when user hovers on them) go to Your Name | Setup | Create | Objects click Edit next to field enter your text in Help Text field.

ExtJS hbox - combo trigger

i have the hbox layout as below
window
--------------------------
| panel
| Form
| hbox
| row 1 combo1 combo2
| form
| hbox
| row 2 combo1 combo2
|
|
--------------------------
The row 2 is added dynamically on clicking a button. Same code is executed to add row 1 and row 2 to hbox. When i click on combo1 in row#1 the roe#2 combo gets clicked.
Any idea why this happens and any suggestion on how i can achieve the behaviour of clicking combo of particular row displays its store?
try using itemId property of form field.
refer docs and extjs-avoid-using-the-id-property

Sortable combo box with columns

I have a combo with more than one value in it (different bindings from the same source)
I would like to create a combo box where the user could sort by those columns and also include a header to clarify the informations
Example :
Item No | Name | Rank
00 | foo | 0
01 | bar | 2
02 | too | 1
We could sort by Item No, Name or rank.
Is it even possible?
Thanks!
Doing it with a ComboBox is definitely possible, but involves changing the entire ComboBox template such that the Popup hosts a ListView. As a simpler alternative, you might consider just using a ToggleButton and Popup, with a ListView inside the Popup.

Resources