public void Initialize (EditSession session) { values = DeployService.GetDeployDirectoryInfo (); ebox = new Gtk.EventBox (); ebox.Show (); PackStart (ebox, true, true, 0); combo = Gtk.ComboBoxEntry.NewText (); combo.Changed += combo_Changed; combo.Entry.IsEditable = false; combo.Entry.HasFrame = false; combo.Entry.HeightRequest = combo.SizeRequest ().Height; combo.Show (); ebox.Add (combo); foreach (DeployDirectoryInfo value in values) { combo.AppendText (value.Description); } }
public void Initialize (EditSession session) { editSession = session; prop = session.Property; ICollection valuesCollection = prop.Converter.GetStandardValues(); values = new TraceLab.Core.Components.EnumValue[valuesCollection.Count]; valuesCollection.CopyTo(values, 0); //values = System.Enum.GetValues (prop.PropertyType); Hashtable names = new Hashtable (); foreach (FieldInfo f in prop.PropertyType.GetFields ()) { DescriptionAttribute att = (DescriptionAttribute) Attribute.GetCustomAttribute (f, typeof(DescriptionAttribute)); if (att != null) names [f.Name] = att.Description; else names [f.Name] = f.Name; } ebox = new Gtk.EventBox (); ebox.Show (); PackStart (ebox, true, true, 0); combo = Gtk.ComboBoxEntry.NewText (); combo.Changed += combo_Changed; combo.Entry.IsEditable = false; combo.Entry.CanFocus = false; combo.Entry.HasFrame = false; combo.Entry.HeightRequest = combo.SizeRequest ().Height; combo.Show (); ebox.Add (combo); foreach (TraceLab.Core.Components.EnumValue value in values) { string str = prop.Converter.ConvertToString (value); if (names.Contains (str)) str = (string) names [str]; combo.AppendText (str); } }
void StartEditing(TableRow row) { EndEditing (); currentEditorRow = row; var cell = GetCell (row); editSession = cell.StartEditing (row.EditorBounds, State); if (editSession == null) return; currentEditor = (Gtk.Widget) editSession.Editor; Add (currentEditor); SetAllocation (currentEditor, row.EditorBounds); currentEditor.Show (); currentEditor.CanFocus = true; currentEditor.GrabFocus (); ConnectTabEvent (currentEditor); editSession.Changed += delegate { if (Changed != null) Changed (this, EventArgs.Empty); }; var vs = ((Gtk.Viewport)Parent).Vadjustment; if (row.EditorBounds.Top < vs.Value) vs.Value = row.EditorBounds.Top; else if (row.EditorBounds.Bottom > vs.Value + vs.PageSize) vs.Value = row.EditorBounds.Bottom - vs.PageSize; QueueDraw (); }
void EndEditing() { if (editSession != null) { Remove (currentEditor); currentEditor.Destroy (); currentEditor = null; editSession.Dispose (); editSession = null; currentEditorRow = null; QueueDraw (); } }
public void Initialize (EditSession session) { }
public void Initialize (EditSession session) { this.property = session.Property; }
public HackEntry (EditSession session, Gtk.Widget child) { this.session = session; box = new EventBox (); box.ButtonPressEvent += new ButtonPressEventHandler (OnClickBox); box.ModifyBg (StateType.Normal, Style.White); box.Add (child); }
public void Initialize(EditSession session) { }
public void Initialize(EditSession session) { this.property = session.Property; }