本文整理汇总了C#中Gtk.ComboBox.ShowAll方法的典型用法代码示例。如果您正苦于以下问题:C# ComboBox.ShowAll方法的具体用法?C# ComboBox.ShowAll怎么用?C# ComboBox.ShowAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.ComboBox
的用法示例。
在下文中一共展示了ComboBox.ShowAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitializeExtraWidget
protected void InitializeExtraWidget()
{
PlaylistFormatDescription [] formats = PlaylistFileUtil.ExportFormats;
int default_export_index = PlaylistFileUtil.GetFormatIndex(formats, playlist);
// Build custom widget used to select the export format.
store = new ListStore(typeof(string), typeof(PlaylistFormatDescription));
foreach (PlaylistFormatDescription format in formats) {
store.AppendValues(format.FormatName, format);
}
HBox hBox = new HBox(false, 2);
combobox = new ComboBox(store);
CellRendererText crt = new CellRendererText();
combobox.PackStart(crt, true);
combobox.SetAttributes(crt, "text", 0);
combobox.Active = default_export_index;
combobox.Changed += OnComboBoxChange;
hBox.PackStart(new Label(Catalog.GetString("Select Format: ")), false, false, 0);
hBox.PackStart(combobox, true, true, 0);
combobox.ShowAll();
hBox.ShowAll();
ExtraWidget = hBox;
}
示例2: createEncoderCombos
protected void createEncoderCombos()
{
//create combo exercises
combo_encoder_exercise_capture = ComboBox.NewText ();
combo_encoder_exercise_analyze = ComboBox.NewText ();
createEncoderComboExerciseAndAnalyze();
combo_encoder_exercise_capture.Changed += new EventHandler (on_combo_encoder_exercise_capture_changed);
combo_encoder_exercise_analyze.Changed += new EventHandler (on_combo_encoder_exercise_analyze_changed);
/* ConcentricEccentric
* unavailable until find while concentric data on concentric is the same than in ecc-con,
* but is very different than in con-ecc
*/
//create combo eccon
string [] comboEcconOptions = { Constants.Concentric,
Constants.EccentricConcentric//,
//Constants.ConcentricEccentric
};
string [] comboEcconOptionsTranslated = {
Catalog.GetString(Constants.Concentric),
Catalog.GetString(Constants.EccentricConcentric)//,
//Catalog.GetString(Constants.ConcentricEccentric)
};
encoderEcconTranslation = new String [comboEcconOptions.Length];
//for(int j=0; j < 3 ; j++)
for(int j=0; j < 2 ; j++)
encoderEcconTranslation[j] = comboEcconOptions[j] + ":" + comboEcconOptionsTranslated[j];
combo_encoder_eccon = ComboBox.NewText ();
UtilGtk.ComboUpdate(combo_encoder_eccon, comboEcconOptionsTranslated, "");
combo_encoder_eccon.Active = UtilGtk.ComboMakeActive(combo_encoder_eccon,
Catalog.GetString(comboEcconOptions[0]));
combo_encoder_eccon.Changed += new EventHandler (on_combo_encoder_eccon_changed);
//create combo laterality. SqliteEncoder Inserts and Update in english. Select is done translated
string [] comboLateralityOptions = { "RL", "R", "L" }; //attention: if this changes, change it also in encoder.cs (EncoderSQL)
string [] comboLateralityOptionsTranslated = {
Catalog.GetString("RL"), Catalog.GetString("R"), Catalog.GetString("L") };
encoderLateralityTranslation = new String [comboLateralityOptions.Length];
for(int j=0; j < 3 ; j++)
encoderLateralityTranslation[j] =
comboLateralityOptions[j] + ":" + comboLateralityOptionsTranslated[j];
combo_encoder_laterality = ComboBox.NewText ();
UtilGtk.ComboUpdate(combo_encoder_laterality, comboLateralityOptionsTranslated, "");
combo_encoder_laterality.Active = UtilGtk.ComboMakeActive(combo_encoder_laterality,
Catalog.GetString(comboLateralityOptions[0]));
//create combo encoder anchorage
combo_encoder_anchorage = Gtk.ComboBox.NewText();
combo_encoder_anchorage.Changed +=
new EventHandler(on_combo_encoder_anchorage_changed );
//create combo analyze cross
createComboAnalyzeCross(true, false); //first creation, without "dateOnX"
createComboEncoderAnalyzeWeights(true); //first creation
//create combo analyze 1RM
string [] comboAnalyze1RMOptions = { "1RM Any exercise", "1RM Bench Press", "1RM Squat", "1RM Indirect" };
string [] comboAnalyze1RMOptionsTranslated = {
Catalog.GetString("1RM Any exercise"), Catalog.GetString("1RM Bench Press"),
Catalog.GetString("1RM Squat"), Catalog.GetString("1RM Indirect")
}; //if added more, change the int in the 'for' below
encoderAnalyze1RMTranslation = new String [comboAnalyze1RMOptions.Length];
for(int j=0; j < 4 ; j++)
encoderAnalyze1RMTranslation[j] =
comboAnalyze1RMOptions[j] + ":" + comboAnalyze1RMOptionsTranslated[j];
combo_encoder_analyze_1RM = ComboBox.NewText ();
UtilGtk.ComboUpdate(combo_encoder_analyze_1RM, comboAnalyze1RMOptionsTranslated, "");
combo_encoder_analyze_1RM.Active = UtilGtk.ComboMakeActive(combo_encoder_analyze_1RM,
Catalog.GetString(comboAnalyze1RMOptions[0]));
combo_encoder_analyze_1RM.Changed += new EventHandler (on_combo_encoder_analyze_1RM_changed);
//create combo analyze curve num combo
//is not an spinbutton because values can be separated: "3,4,7,21"
combo_encoder_analyze_curve_num_combo = ComboBox.NewText ();
UtilGtk.ComboUpdate(combo_encoder_analyze_curve_num_combo, Util.StringToStringArray(""), "");
//pack combos
hbox_combo_encoder_exercise_capture.PackStart(combo_encoder_exercise_capture, true, true, 0);
hbox_combo_encoder_exercise_capture.ShowAll();
combo_encoder_exercise_capture.Sensitive = true;
hbox_combo_encoder_exercise_analyze.PackStart(combo_encoder_exercise_analyze, true, true, 0);
//hbox_combo_encoder_exercise_analyze.ShowAll(); //hbox will be shown only on intersession & interperson
combo_encoder_exercise_analyze.ShowAll();
combo_encoder_exercise_analyze.Sensitive = true;
hbox_combo_encoder_eccon.PackStart(combo_encoder_eccon, true, true, 0);
hbox_combo_encoder_eccon.ShowAll();
combo_encoder_eccon.Sensitive = true;
hbox_combo_encoder_laterality.PackStart(combo_encoder_laterality, true, true, 0);
hbox_combo_encoder_laterality.ShowAll();
combo_encoder_laterality.Sensitive = true;
hbox_combo_encoder_anchorage.PackStart(combo_encoder_anchorage, false, true, 0);
hbox_combo_encoder_anchorage.ShowAll();
combo_encoder_anchorage.Sensitive = true;
//.........这里部分代码省略.........