private void DisplayMorphForm(IVwEnv vwenv, int hvo, int frag, int ws, int choiceIndex) { int hvoMorphForm = vwenv.DataAccess.get_ObjectProp(hvo, ktagSbMorphForm); // Allow editing of the morpheme breakdown line. SetColor(vwenv, m_choices.LabelRGBFor(choiceIndex)); // On this line we want an icon only for the first column (and only if it is the first // occurrence of the flid). bool fWantIcon = m_fIsMorphemeFormEditable && (frag == kfragFirstMorph) && m_choices.IsFirstOccurrenceOfFlid(choiceIndex); if (!fWantIcon) { SetIndentForMissingIcon(vwenv); } vwenv.OpenParagraph(); bool fFirstMorphLine = (m_choices.IndexOf(InterlinLineChoices.kflidMorphemes) == choiceIndex); if (fWantIcon) // Review JohnT: should we do the 'edit box' for all first columns? { AddPullDownIcon(vwenv, ktagMorphFormIcon); // Create an edit box that stays visible when the user deletes // the first morpheme (like the WordGloss box). // This is especially useful if the user wants to // delete the entire MorphForm line (cf. LT-1621). vwenv.set_IntProperty((int)FwTextPropType.ktptMarginTrailing, (int)FwTextPropVar.ktpvMilliPoint, kmpIconMargin); vwenv.set_IntProperty((int)FwTextPropType.ktptPadTrailing, (int)FwTextPropVar.ktpvMilliPoint, 2000); vwenv.set_IntProperty((int)FwTextPropType.ktptPadLeading, (int)FwTextPropVar.ktpvMilliPoint, 2000); vwenv.set_IntProperty((int)FwTextPropType.ktptBackColor, (int)FwTextPropVar.ktpvDefault, krgbEditable); } if (m_fIsMorphemeFormEditable) { MakeNextFlowObjectEditable(vwenv); } else { MakeNextFlowObjectReadOnly(vwenv); } vwenv.OpenInnerPile(); vwenv.OpenParagraph(); if (fFirstMorphLine) { vwenv.AddStringProp(ktagSbMorphPrefix, this); } // This is never missing, but may, or may not, be editable. vwenv.AddObjProp(ktagSbMorphForm, this, kfragNamedObjectNameChoices + choiceIndex); if (fFirstMorphLine) { vwenv.AddStringProp(ktagSbMorphPostfix, this); } // close the special edit box we opened for the first morpheme. vwenv.CloseParagraph(); vwenv.CloseInnerPile(); vwenv.CloseParagraph(); }