本文整理汇总了C#中Gtk.Entry.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Entry.Show方法的具体用法?C# Entry.Show怎么用?C# Entry.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Entry
的用法示例。
在下文中一共展示了Entry.Show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OpenRemoteServer
public OpenRemoteServer () : base (Catalog.GetString ("Open remote DAAP server"), null)
{
VBox.Spacing = 6;
VBox.PackStart (new Label () {
Xalign = 0.0f,
Text = Catalog.GetString ("Enter server IP address and port:")
}, true, true, 0);
HBox box = new HBox ();
box.Spacing = 12;
VBox.PackStart (box, false, false, 0);
address_entry = new Entry ();
address_entry.Activated += OnEntryActivated;
address_entry.WidthChars = 30;
address_entry.Show ();
port_entry = new SpinButton (1d, 65535d, 1d);
port_entry.Value = 3689;
port_entry.Show ();
box.PackStart (address_entry, true, true, 0);
box.PackEnd (port_entry, false, false, 0);
address_entry.HasFocus = true;
VBox.ShowAll ();
AddStockButton (Stock.Cancel, ResponseType.Cancel);
AddStockButton (Stock.Ok, ResponseType.Ok, true);
}
示例2: ToolbarEntry
public ToolbarEntry(ICommand cmd)
: base(cmd)
{
entry = new Entry ();
entry.Activated += new EventHandler (OnActivated);
entry.Text = cmd.Properties.Text;
this.Add (entry);
entry.Show ();
this.ShowAll ();
}
示例3: AccountLoginForm
public AccountLoginForm(Account account)
: base(1, 2, false)
{
this.account = account;
BorderWidth = 5;
RowSpacing = 5;
ColumnSpacing = 5;
Label username_label = new Label (Catalog.GetString ("Username:"));
username_label.Xalign = 1.0f;
username_label.Show ();
username_entry = new Entry ();
username_entry.Show ();
Attach (username_label, 0, 1, 0, 1, AttachOptions.Fill,
AttachOptions.Shrink, 0, 0);
Attach (username_entry, 1, 2, 0, 1, AttachOptions.Fill | AttachOptions.Expand,
AttachOptions.Shrink, 0, 0);
username_entry.Text = account.UserName ?? String.Empty;
}
示例4: MakeAppearancePage
private Gtk.Widget MakeAppearancePage()
{
VBox vbox = new VBox (false, 6);
vbox.BorderWidth = 10;
VBox sectionVBox = new VBox (false, 4);
Label l = new Label ();
l.Markup = string.Format ("<span size=\"large\" weight=\"bold\">{0}</span>",
Catalog.GetString ("Color Management"));
l.UseUnderline = false;
l.UseMarkup = true;
l.Wrap = false;
l.Xalign = 0;
l.Show ();
sectionVBox.PackStart (l, false, false, 0);
HBox hbox = new HBox (false, 6);
Label lblTodaysTaskColor = new Label ();
lblTodaysTaskColor.Text = Catalog.GetString ("Today:");
lblTodaysTaskColor.Xalign = 0;
lblTodaysTaskColor.WidthRequest = 75;
lblTodaysTaskColor.Show ();
IPreferences prefs = application.Preferences;
txtTodaysTaskColor = new Entry();
txtTodaysTaskColor.Text = prefs.Get (PreferencesKeys.TodayTaskTextColor);
txtTodaysTaskColor.Changed += OnTxtTodaysTaskColorChanged;
txtTodaysTaskColor.Show ();
btnChangeTodaysTaskColor = new ColorButton();
string todayTasksColor = prefs.Get (PreferencesKeys.TodayTaskTextColor);
Gdk.Color currentColor = new Gdk.Color();
Gdk.Color.Parse (todayTasksColor, ref currentColor);
btnChangeTodaysTaskColor.Color = currentColor;
btnChangeTodaysTaskColor.ColorSet += OnBtnChangeTodaysTaskColorColorSet;
btnChangeTodaysTaskColor.Show ();
hbox.PackStart (lblTodaysTaskColor, false, false, 0);
hbox.PackStart (txtTodaysTaskColor, false, false, 0);
hbox.PackStart (btnChangeTodaysTaskColor, false, false, 0);
hbox.Show ();
HBox hbox2 = new HBox (false, 6);
Label lblOverdueTaskColor = new Label ();
lblOverdueTaskColor.Text = Catalog.GetString ("Overdue:");
lblOverdueTaskColor.WidthRequest = 75;
lblOverdueTaskColor.Xalign = 0;
lblOverdueTaskColor.Show ();
txtOverdueTaskColor = new Entry();
txtOverdueTaskColor.Text = prefs.Get (PreferencesKeys.OverdueTaskTextColor);
txtOverdueTaskColor.Changed += OnTxtOverdueTaskColorChanged;
txtOverdueTaskColor.Show ();
btnChangeOverdueTaskColor = new ColorButton();
string overdueTasksColor = prefs.Get (PreferencesKeys.OverdueTaskTextColor);
Gdk.Color overdueColor = new Gdk.Color();
Gdk.Color.Parse (overdueTasksColor, ref overdueColor);
btnChangeOverdueTaskColor.Color = overdueColor;
btnChangeOverdueTaskColor.ColorSet += OnBtnChangeOverdueTaskColorColorSet;
btnChangeOverdueTaskColor.Show();
hbox2.PackStart (lblOverdueTaskColor, false, false, 0);
hbox2.PackStart (txtOverdueTaskColor, false, false, 0);
hbox2.PackStart (btnChangeOverdueTaskColor, false, false, 0);
hbox2.Show ();
sectionVBox.PackStart (hbox, false, false, 0);
sectionVBox.PackStart (hbox2, false, false, 0);
sectionVBox.Show();
vbox.PackStart (sectionVBox, false, false, 0);
return vbox;
}
示例5: CreateWidget
void CreateWidget()
{
Homogeneous = false;
Spacing = 1;
Add (date_entry = new Entry () {WidthChars = 10, IsEditable = true});
date_entry.Changed += HandleDateEntryChanged;
date_entry.Show ();
var bbox = new HBox ();
Widget w;
bbox.Add (w = calendar_label = new Label (Catalog.GetString ("Calendar")));
w.Show ();
bbox.Add (w = new Arrow (ArrowType.Down, ShadowType.Out));
w.Show ();
bbox.Show ();
Add (date_button = new Button (bbox));
date_button.Clicked += HandleCalendarButtonClicked;
date_button.Show ();
Add (time_entry = new Entry () {WidthChars = 12, IsEditable = true});
time_entry.Changed += HandleTimeEntryChanged;
time_entry.Show ();
Add (offset_entry = new Entry () {WidthChars = 6, IsEditable = true});
offset_entry.Changed += HandleOffsetEntryChanged;
offset_entry.Show ();
calendar = new Calendar ();
calendar.DaySelected += HandleCalendarDaySelected;
calendar.DaySelectedDoubleClick += HandleCalendarDaySelectedDoubleClick;
var frame = new Frame ();
frame.Add (calendar);
calendar.Show ();
calendar_popup = new Window (WindowType.Popup) {DestroyWithParent = true, Resizable = false};
calendar_popup.Add (frame);
calendar_popup.DeleteEvent += HandlePopupDeleted;
calendar_popup.KeyPressEvent += HandlePopupKeyPressed;
calendar_popup.ButtonPressEvent += HandlePopupButtonPressed;
frame.Show ();
UpdateWidget ();
}
示例6: CreateEditWidget
private Widget CreateEditWidget()
{
statusEntry = new Entry ();
statusEntry.ModifyBg (StateType.Normal, Style.Background (StateType.Active));
statusEntry.Activated += OnStatusEntryActivated;
statusEntry.KeyPressEvent += OnStatusEntryKeyPressEvent;
statusEntry.Show ();
return statusEntry;
}
示例7: BuildArgumentEntry
Func<object> BuildArgumentEntry(Argument a)
{
Label lbl = new Label ();
Entry ety = new Entry ();
DType t = Mapper.DTypeFromString(a.Type);
lbl.Text = string.Format ("{0} ({1}) : ", a.Name, Mapper.DTypeToStr (t));
lbl.Xalign = 0;
argumentTable.Attach (lbl, 0, 1, rowIndex, rowIndex + 1);
argumentTable.Attach (ety, 1, 2, rowIndex, rowIndex + 1);
rowIndex++;
lbl.Show ();
ety.Show ();
argumentTable.ShowAll ();
return (Func<object>)delegate {
object result = Mapper.Convert(t, ety.Text);
return result;
};
}
示例8: createEmptyTable
void createEmptyTable()
{
entries = new ArrayList();
radiosM = new ArrayList();
radiosF = new ArrayList();
spins = new ArrayList();
Gtk.Label nameLabel = new Gtk.Label("<b>" + Catalog.GetString("Full name") + "</b>");
Gtk.Label sexLabel = new Gtk.Label("<b>" + Catalog.GetString("Sex") + "</b>");
Gtk.Label weightLabel = new Gtk.Label("<b>" + Catalog.GetString("Weight") +
"</b>(" + Catalog.GetString("Kg") + ")" );
nameLabel.UseMarkup = true;
sexLabel.UseMarkup = true;
weightLabel.UseMarkup = true;
nameLabel.Xalign = 0;
sexLabel.Xalign = 0;
weightLabel.Xalign = 0;
weightLabel.Show();
nameLabel.Show();
sexLabel.Show();
uint padding = 4;
table_main.Attach (nameLabel, (uint) 1, (uint) 2, 0, 1,
Gtk.AttachOptions.Fill | Gtk.AttachOptions.Expand , Gtk.AttachOptions.Shrink, padding, padding);
table_main.Attach (sexLabel, (uint) 2, (uint) 3, 0, 1,
Gtk.AttachOptions.Shrink, Gtk.AttachOptions.Shrink, padding, padding);
table_main.Attach (weightLabel, (uint) 3, (uint) 4, 0, 1,
Gtk.AttachOptions.Shrink, Gtk.AttachOptions.Shrink, padding, padding);
for (int count=1; count <= rows; count ++) {
Gtk.Label myLabel = new Gtk.Label((count).ToString());
table_main.Attach (myLabel, (uint) 0, (uint) 1, (uint) count, (uint) count +1,
Gtk.AttachOptions.Shrink, Gtk.AttachOptions.Shrink, padding, padding);
myLabel.Show();
//labels.Add(myLabel);
Gtk.Entry myEntry = new Gtk.Entry();
table_main.Attach (myEntry, (uint) 1, (uint) 2, (uint) count, (uint) count +1,
Gtk.AttachOptions.Fill | Gtk.AttachOptions.Expand , Gtk.AttachOptions.Shrink, padding, padding);
myEntry.Show();
entries.Add(myEntry);
Gtk.RadioButton myRadioM = new Gtk.RadioButton(Catalog.GetString(Constants.M));
myRadioM.Show();
radiosM.Add(myRadioM);
Gtk.RadioButton myRadioF = new Gtk.RadioButton(myRadioM, Catalog.GetString(Constants.F));
myRadioF.Show();
radiosF.Add(myRadioF);
Gtk.HBox sexBox = new HBox();
sexBox.PackStart(myRadioM, false, false, 4);
sexBox.PackStart(myRadioF, false, false, 4);
sexBox.Show();
table_main.Attach (sexBox, (uint) 2, (uint) 3, (uint) count, (uint) count +1,
Gtk.AttachOptions.Shrink, Gtk.AttachOptions.Shrink, padding, padding);
Gtk.SpinButton mySpin = new Gtk.SpinButton(0, 300, .1);
table_main.Attach (mySpin, (uint) 3, (uint) 4, (uint) count, (uint) count +1,
Gtk.AttachOptions.Shrink, Gtk.AttachOptions.Shrink, padding, padding);
mySpin.Show();
spins.Add(mySpin);
}
string sportStuffString = "";
if(currentSession.PersonsSportID != Constants.SportUndefinedID)
sportStuffString += Catalog.GetString("Sport") + ":<i>" + Catalog.GetString(SqliteSport.Select(false, currentSession.PersonsSportID).Name) + "</i>.";
if(currentSession.PersonsSpeciallityID != Constants.SpeciallityUndefinedID)
sportStuffString += " " + Catalog.GetString("Specialty") + ":<i>" + SqliteSpeciallity.Select(false, currentSession.PersonsSpeciallityID) + "</i>.";
if(currentSession.PersonsPractice != Constants.LevelUndefinedID)
sportStuffString += " " + Catalog.GetString("Level") + ":<i>" + Util.FindLevelName(currentSession.PersonsPractice) + "</i>.";
if(sportStuffString.Length > 0)
sportStuffString = Catalog.GetString("Persons will be created with default session values") +
":\n" + sportStuffString;
label_message.Text = sportStuffString;
label_message.UseMarkup = true;
label_message.Visible = true;
table_main.Show();
scrolledwindow.Visible = true;
notebook.CurrentPage = 0;
//once loaded table cannot be created again
//don't do this: it crashes
//button_manually_created.Sensitive = false;
//do this:
created_table = true;
button_accept.Sensitive = true;
}
示例9: createCritRow
void createCritRow(string attr, string op, string val)
{
_numCriteria++;
HBox hbox = new HBox (false, 0);
critVbox.PackStart (hbox, true, true, 0);
Gtk.Entry attrEntry = new Gtk.Entry ();
attrEntry.Text = attr;
attrEntry.Show ();
hbox.PackStart (attrEntry, true, true, 5);
VBox vbox75 = new VBox (false, 0);
vbox75.Show ();
hbox.PackStart (vbox75, true, true, 5);
ComboBox critCombo = createCombo (ops);
comboSetActive (critCombo, ops, op);
vbox75.PackStart (critCombo, false, true, 16);
Gtk.Entry valEntry = new Gtk.Entry ();
valEntry.Text = val;
valEntry.Show ();
hbox.PackStart (valEntry, true, true, 5);
VBox vbox76 = new VBox (false, 0);
vbox76.Show ();
hbox.PackStart (vbox76, true, true, 5);
ComboBox boolCombo = createCombo (boolOps);
boolCombo.Sensitive = false;
vbox76.PackStart (boolCombo, false, true, 16);
if (_numCriteria == 1) {
firstCritCombo = boolCombo;
firstCritCombo.Changed += new EventHandler (OnBoolChanged);
} else if (_numCriteria > 1) {
_allCombos.Add (boolCombo);
}
SearchCriteria sc = new SearchCriteria (
hbox, attrEntry, critCombo, valEntry, boolCombo);
string key = "row" + _numCriteria.ToString ();
_critTable.Add (key, sc);
if (_numCriteria > 1)
toggleBoolCombo (_numCriteria);
critVbox.ShowAll ();
}
示例10: BuildLimitFooter
private HBox BuildLimitFooter()
{
HBox limitFooter = new HBox();
limitFooter.Show();
limitFooter.Spacing = 5;
limitCheckBox = new CheckButton("Limit to");
limitCheckBox.Show();
limitCheckBox.Toggled += OnLimitCheckBoxToggled;
limitFooter.PackStart(limitCheckBox, false, false, 0);
limitEntry = new Entry("25");
limitEntry.Show();
limitEntry.SetSizeRequest(50, -1);
limitFooter.PackStart(limitEntry, false, false, 0);
limitComboBox = ComboBox.NewText();
limitComboBox.Show();
foreach(string criteria in model.LimitCriteria)
limitComboBox.AppendText(criteria);
limitComboBox.Active = 0;
limitFooter.PackStart(limitComboBox, false, false, 0);
Label orderLabel = new Label("selected by");
orderLabel.Show();
limitFooter.PackStart(orderLabel, false, false, 0);
orderComboBox = ComboBox.NewText();
orderComboBox.Show();
foreach(string order in model.OrderCriteria)
orderComboBox.AppendText(order);
orderComboBox.Active = 0;
limitFooter.PackStart(orderComboBox, false, false, 0);
limitCheckBox.Active = false;
OnLimitCheckBoxToggled(limitCheckBox, null);
return limitFooter;
}
示例11: StringValueToTable
protected void StringValueToTable(Table container, string name, string valueText, ref int row)
{
Label targetLabel = new Label();
Entry target = new Entry();
target.Text = valueText;
target.Sensitive = false;
target.Show();
targetLabel.Text = name;
targetLabel.Xalign = 0;
targetLabel.Xpad = 13;
targetLabel.Show();
container.Attach(targetLabel, (uint)0, (uint)1, (uint)row, (uint)(row + 1), AttachOptions.Fill, AttachOptions.Shrink, 0, 0);
container.Attach(target, (uint)1, (uint)2, (uint)row, (uint)(row + 1), AttachOptions.Expand|AttachOptions.Fill, AttachOptions.Shrink, 0, 0);
row += 1;
//Console.WriteLine ("Finished writing to row {0}", row);
}
示例12: CreateSidebarSearchEntry
/* private void OnStatusComboKeyPress (object sender, KeyPressEventArgs args)
{
if (args.Event.Key == Gdk.Key.Return) {
if (PersonManager.Me != null) {
Logger.Debug ("FIXME: Set \"my\" status to: {0}",
statusComboBoxEntry.ActiveText);
PersonManager.Me.Presence.Message =
statusComboBoxEntry.ActiveText;
}
}
}
*/
/* private void OnStatusComboChanged (object sender, EventArgs args)
{
Logger.Debug ("OnStatusComboChanged");
}
*/
private Widget CreateSidebarSearchEntry()
{
VBox vbox = new VBox (false, 0);
Label l = new Label (
string.Format ("<span size=\"large\">{0}</span>",
Catalog.GetString ("Filter")));
l.UseMarkup = true;
l.ModifyFg (StateType.Normal, this.Style.Base (StateType.Selected));
l.Xalign = 0;
l.Show ();
vbox.PackStart (l, false, false, 0);
searchEntry = new Entry ();
searchEntry.SelectRegion (0, -1);
searchEntry.CanFocus = true;
searchEntry.Changed += OnSearchEntryChanged;
searchEntry.Show ();
Image stopImage = new Image (Stock.Stop, Gtk.IconSize.Menu);
stopImage.SetAlignment (0.5F, 0.0F);
cancelSearchButton = new Button (stopImage);
cancelSearchButton.Relief = ReliefStyle.None;
cancelSearchButton.Sensitive = false;
cancelSearchButton.Clicked += OnCancelSearchButton;
cancelSearchButton.Show ();
HBox searchHBox = new HBox (false, 4);
searchHBox.PackStart (searchEntry, true, true, 0);
searchHBox.PackStart (cancelSearchButton, false, false, 0);
searchHBox.Show ();
vbox.PackStart (searchHBox, false, false, 0);
return vbox;
}
示例13: ToolbarEntry
public ToolbarEntry()
: base()
{
entry = new Entry ();
entry.Activated += new EventHandler (OnActivated);
this.Add (entry);
entry.Show ();
this.ShowAll ();
}
示例14: FaceBox
// FIXME clicking the spinbutton too fast seems to switch the view to browse
public FaceBox (Gtk.Box tb, PhotoImageView vw) : base() {
m_list = new ArrayList();
face_store = Core.Database.Faces;
View = vw;
tag_store = FSpot.Core.Database.Tags;
Gtk.Label lab = new Gtk.Label("Face det:");
lab.Show();
tb.PackStart(lab, false, true, 0);
face_button = new ToolbarButton ();
face_button.Add (new Gtk.Image ("f-spot-sepia", IconSize.Button));
tb.PackStart (face_button, false, true, 0);
face_button.Clicked += HandleFaceButtonClicked;
tag_entry = new Gtk.Entry ("test");
tag_entry.Show();
tag_entry.Sensitive = false;
tb.PackStart(tag_entry, false, true, 0);
m_newtag_button = new ToolbarButton ();
m_newtag_button.Add (new Gtk.Image ("f-spot-new-tag", IconSize.Button));
m_newtag_button.Show();
m_newtag_button.Sensitive = false;
tb.PackStart(m_newtag_button,false,true,0);
m_newtag_button.Clicked += HandleNewTagButtonClicked;
m_spin = new SpinButton(1,1,1);
m_spin.Show();
m_spin.Sensitive = false;
tb.PackStart(m_spin, false, true, 0);
m_spin.Changed += HandleSpinChanged;
//m.spin.ValueChanged += jesli w bazie, to pokaz jego tag
//this.Add(tag_widget);
}
示例15: InitWindow
void InitWindow()
{
int height;
int width;
this.Icon = Utilities.GetIcon ("tasque-48", 48);
// Update the window title
Title = string.Format ("Tasque");
width = GtkApplication.Instance.Preferences.GetInt("MainWindowWidth");
height = GtkApplication.Instance.Preferences.GetInt("MainWindowHeight");
if(width == -1)
width = 600;
if(height == -1)
height = 600;
this.DefaultSize = new Gdk.Size( width, height);
accelGroup = new AccelGroup ();
AddAccelGroup (accelGroup);
globalKeys = new GlobalKeybinder (accelGroup);
VBox mainVBox = new VBox();
mainVBox.BorderWidth = 0;
mainVBox.Show ();
this.Add (mainVBox);
HBox topHBox = new HBox (false, 0);
topHBox.BorderWidth = 4;
categoryComboBox = new ComboBox ();
categoryComboBox.Accessible.Description = "Category Selection";
categoryComboBox.WidthRequest = 150;
categoryComboBox.WrapWidth = 1;
categoryComboBox.Sensitive = false;
CellRendererText comboBoxRenderer = new Gtk.CellRendererText ();
comboBoxRenderer.WidthChars = 20;
comboBoxRenderer.Ellipsize = Pango.EllipsizeMode.End;
categoryComboBox.PackStart (comboBoxRenderer, true);
categoryComboBox.SetCellDataFunc (comboBoxRenderer,
new Gtk.CellLayoutDataFunc (CategoryComboBoxDataFunc));
categoryComboBox.Show ();
topHBox.PackStart (categoryComboBox, false, false, 0);
// Space the addTaskButton and the categoryComboBox
// far apart by using a blank label that expands
Label spacer = new Label (string.Empty);
spacer.Show ();
topHBox.PackStart (spacer, true, true, 0);
// The new task entry widget
addTaskEntry = new Entry (Catalog.GetString ("New task..."));
addTaskEntry.Sensitive = false;
addTaskEntry.Focused += OnAddTaskEntryFocused;
addTaskEntry.Changed += OnAddTaskEntryChanged;
addTaskEntry.Activated += OnAddTaskEntryActivated;
addTaskEntry.FocusInEvent += OnAddTaskEntryFocused;
addTaskEntry.FocusOutEvent += OnAddTaskEntryUnfocused;
addTaskEntry.DragDataReceived += OnAddTaskEntryDragDataReceived;
addTaskEntry.Show ();
topHBox.PackStart (addTaskEntry, true, true, 0);
// Use a small add icon so the button isn't mammoth-sized
HBox buttonHBox = new HBox (false, 6);
Gtk.Image addImage = new Gtk.Image (Gtk.Stock.Add, IconSize.Menu);
addImage.Show ();
buttonHBox.PackStart (addImage, false, false, 0);
Label l = new Label (Catalog.GetString ("_Add"));
l.Show ();
buttonHBox.PackStart (l, true, true, 0);
buttonHBox.Show ();
addTaskButton =
new MenuToolButton (buttonHBox, Catalog.GetString ("_Add Task"));
addTaskButton.UseUnderline = true;
// Disactivate the button until the backend is initialized
addTaskButton.Sensitive = false;
Gtk.Menu addTaskMenu = new Gtk.Menu ();
addTaskButton.Menu = addTaskMenu;
addTaskButton.Clicked += OnAddTask;
addTaskButton.Show ();
topHBox.PackStart (addTaskButton, false, false, 0);
globalKeys.AddAccelerator (OnGrabEntryFocus,
(uint) Gdk.Key.n,
Gdk.ModifierType.ControlMask,
Gtk.AccelFlags.Visible);
globalKeys.AddAccelerator (delegate (object sender, EventArgs e) {
GtkApplication.Instance.Quit (); },
(uint) Gdk.Key.q,
Gdk.ModifierType.ControlMask,
Gtk.AccelFlags.Visible);
this.KeyPressEvent += KeyPressed;
topHBox.Show ();
mainVBox.PackStart (topHBox, false, false, 0);
//.........这里部分代码省略.........