Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "Karl-Heinz" Newsgroups: comp.lang.clipper.visual-objects Subject: Re: BBrowser, celledit, BEDIT_CREATE etc Date: Thu, 22 Feb 2018 17:02:46 +0100 Lines: 128 Message-ID: References: <68f1386b-1d0b-42dd-a6c9-1f0a64d908cc@googlegroups.com> <263bbe18-048a-43a3-a070-1a55e783613a@googlegroups.com> <31711782-f811-4ae9-861c-e72d61d5d035@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="UTF-8"; reply-type=original Content-Transfer-Encoding: 8bit X-Trace: individual.net CFzXSWmrDRVPQ0a8WFpVLQv1bVmTnMQQA/eu4yrH45T3Jy/Q8= Cancel-Lock: sha1:7nt4ED4q6P97wMg6I1OhPtGS3fA= In-Reply-To: X-Priority: 3 X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 16.4.3564.1216 X-MimeOLE: Produced By Microsoft MimeOLE V16.4.3564.1216 Xref: csiph.com comp.lang.clipper.visual-objects:11393 Hi Phil, maybe the cigar winner ;-) bCityEdit inherits from SingleLineEdit. So why not simply surpress the Keyboard and Mouse input by adding a Dispatcher ? BTW. The ComboBox glyp is still working , and the escape key also. ------------------ METHOD Dispatch ( oEvent ) CLASS bCityEdit DO CASE CASE oEvent:message == WM_KEYDOWN .OR. oEvent:message == WM_CHAR RETURN SELF:EventReturnValue := 1L CASE oEvent:message == WM_LBUTTONDOWN .OR. oEvent:message == WM_LBUTTONDBLCLK // no selection allowed RETURN SELF:EventReturnValue := 1L CASE oEvent:message == WM_RBUTTONDOWN // surpress the Context menu RETURN SELF:EventReturnValue := 1L ENDCASE RETURN SUPER:Dispatch (oEvent ) -------------------------------------------- I have also restored the original CellEdit() method ------------------------------------------------------------- METHOD CellEdit(oEvent) CLASS dtwComboEdit LOCAL oColumn AS bDataColumn IF oEvent:EditMode=BEDIT_CREATE oColumn := oEvent:Control:GetOpenColumn(oEvent:EditCell:Column) IF oColumn:FieldSym==#CITY oEvent:EditControl := oEvent:Control:EditCreate(oEvent:EditCell:Column, oEvent:EditCell:Row, oEvent:EditCell:RecNo, #bCityEdit) ENDIF ENDIF RETURN NIL --------------------------------------------- regards Karl-Heinz "Karl-Heinz" schrieb im Newsbeitrag news:ff7vqeF15jhU1@mid.individual.net... Hi Phil ok, just read your other postings .. > have all the Browser button call a window, browser 1000's of records all > working. It is simply the CELL is an editable, type in cell. if your goal is really to pick something from such a large list: A combobox is not designed to hold such an amount of items. Another option might be a (virtual) Listview. But i never tried to attach it to a bBrowser cell . regards Karl-Heinz "Karl-Heinz" schrieb im Newsbeitrag news:ff7rm6F87vU1@mid.individual.net... Hi Phil, > Want only be have a user selectable picklist and not a typeable field > Like a combobox style Dropdownlist. > > If you load sample.. can you tell me how to change sample to achieve this > ? > here´s what i´ve tried, and it seems to work: METHOD CellEdit(oEvent) CLASS dtwComboEdit LOCAL oColumn AS bDataColumn IF oEvent:EditMode=BEDIT_CREATE oColumn := oEvent:Control:GetOpenColumn(oEvent:EditCell:Column) IF oColumn:FieldSym==#CITY //oEvent:EditControl := oEvent:Control:EditCreate(oEvent:EditCell:Column, oEvent:EditCell:Row, oEvent:EditCell:RecNo, #bCityEdit) oEvent:EditControl := oEvent:Control:EditCreate(oEvent:EditCell:Column, oEvent:EditCell:Row, oEvent:EditCell:RecNo, #combobox, CBS_SORT , BOXDROPDOWNLIST ) // oEvent:EditControl:fillusing ( SELF:oDCBrowser:server , #CITY , #CITY) doesn´t seem to work ??? // add some Citynames manually instead, whereby "Textvalue" and "Value" must be always the same ! oEvent:EditControl:fillusing ( {{ "San Diego", "San Diego" } , {"Chicago" , "Chicago" } , { "Boston", "Boston" } , {"Portland" , "Portland" } } ) ENDIF ENDIF RETURN NIL regards Karl-Heinz