/// <summary>
        /// Triggered when the user clicks on the create button on the title bar. Creates a brand new dictionary with zero
        /// elements in the place of the current dictionary.
        /// </summary>
        protected void OnCreateButtonClicked()
        {
            CreateDictionary();
            UpdateHeaderGUI();

            editRow.Initialize(this, guiContentLayout, 0, depth + 1);
            editRow.Enabled = false;

            isModified = true;
        }
        /// <summary>
        /// Completely rebuilds the dictionary GUI elements.
        /// </summary>
        public void BuildGUI()
        {
            editKey   = CreateKey();
            editValue = CreateValue();

            UpdateHeaderGUI();

            foreach (var KVP in rows)
            {
                KVP.Value.Destroy();
            }

            rows.Clear();

            if (editRow != null)
            {
                editRow.Destroy();
                editRow = null;
            }

            if (!IsNull())
            {
                // Hidden dependency: BuildGUI must be called after all elements are
                // in the dictionary so we do it in two steps
                int numRows = GetNumRows();
                for (int i = 0; i < numRows; i++)
                {
                    GUIDictionaryFieldRow newRow = CreateRow();
                    rows.Add(i, newRow);
                }

                editRow = CreateRow();
                editRow.Initialize(this, guiContentLayout, numRows, depth + 1);
                editRow.Enabled = false;

                for (int i = 0; i < numRows; i++)
                {
                    rows[i].Initialize(this, guiContentLayout, i, depth + 1);
                }
            }
        }