SIL.FieldWorks.TE.NotesMainWnd.OnUpdateStyleComboBox C# (CSharp) Method

OnUpdateStyleComboBox() protected method

Enables/disables the styles combobox
protected OnUpdateStyleComboBox ( object args ) : bool
args object
return bool
		protected bool OnUpdateStyleComboBox(object args)
		{
			TMItemProperties itemProps = args as TMItemProperties;

			if (itemProps == null)
				return false;

			ComboBox cbo = itemProps.Control as ComboBox;

			if (cbo != null)
			{
				bool fEnable = (FwEditingHelper != null &&
					FwEditingHelper.CurrentSelection != null &&
					FwEditingHelper.CurrentSelection.Selection.IsEditable
					//&& cbo == m_charStylesComboBox
					);

				itemProps.Enabled = fEnable;
				cbo.Enabled = itemProps.Enabled;
				itemProps.Update = true;
				return true;
			}

			return false;
		}