private void EditorInitialize(object sender, EditorInitializeEventArgs e)
        {
            if (sender == nameNodeControl)
            {
                TextBox textBox = e.Editor as TextBox;
                if (textBox != null)
                {
                    textBox.KeyDown += new KeyEventHandler(textBox_KeyDown);
                }
            }
            else if (sender == targetNodeControl)
            {
                ComboBox comboBox = e.Editor as ComboBox;
                if (comboBox != null)
                {
                    if (e.Node != null && e.Node.Tag != null)
                    {
                        GrtListNode node = e.Node.Tag as GrtListNode;

                        String value;
                        grtList.get_field(node.NodeId, (int)FKConstraintListWrapper.FKConstraintListColumns.RefTable, out value);

                        comboBox.Items.Clear();
                        using (Graphics graphics = comboBox.CreateGraphics())
                        {
                            float         maxWidth = 200; // Minimum width
                            List <string> tables   = mySQLTableEditorWrapper.get_all_table_names();
                            foreach (string table in tables)
                            {
                                comboBox.Items.Add(table);
                                SizeF size = graphics.MeasureString(table, comboBox.Font);
                                if (size.Width > maxWidth)
                                {
                                    maxWidth = size.Width;
                                }

                                // Make sure the previous selected item is selected again
                                if (table.Equals(value))
                                {
                                    comboBox.SelectedIndex = comboBox.Items.Count - 1;
                                }
                            }

                            // Limit width to a sane value.
                            if (maxWidth > 700)
                            {
                                maxWidth = 700;
                            }
                            comboBox.DropDownWidth = (int)Math.Ceiling(maxWidth);
                        }
                    }

                    comboBox.KeyDown        += new KeyEventHandler(textBox_KeyDown);
                    comboBox.DropDownClosed += new EventHandler(comboBox_DropDownClosed);
                }
            }
        }