/// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.GetEntryText"]/*' /> public virtual int GetEntryText(int combo, int entry, out string text) { text = null; DropDownMember member = GetMember(combo, entry); if (member != null) { text = member.Label; } return(NativeMethods.S_OK); }
/// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.GetEntryAttributes"]/*' /> public virtual int GetEntryAttributes(int combo, int entry, out uint fontAttrs) { fontAttrs = (uint)DROPDOWNFONTATTR.FONTATTR_PLAIN; DropDownMember member = GetMember(combo, entry); if (member != null) { fontAttrs = (uint)member.FontAttr; } return(NativeMethods.S_OK); }
/// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.GetEntryImage"]/*' /> public virtual int GetEntryImage(int combo, int entry, out int imgIndex) { // this happens during drawing and has to be fast imgIndex = -1; DropDownMember member = GetMember(combo, entry); if (member != null) { imgIndex = member.Glyph; } return(NativeMethods.S_OK); }
/// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="TypeAndMemberDropdownBars.OnItemChosen"]/*' /> public virtual int OnItemChosen(int combo, int entry) { DropDownMember member = GetMember(combo, entry); if (member != null && this.textView != null) { int line = member.Span.iStartLine; int col = member.Span.iStartIndex; try { // Here we don't want to throw or to check the return value. textView.CenterLines(line, 16); } catch (COMException) { } NativeMethods.ThrowOnFailure(this.textView.SetCaretPos(line, col)); NativeMethods.SetFocus(this.textView.GetWindowHandle()); this.SynchronizeDropdowns(this.textView, line, col); } return(NativeMethods.S_OK); }