Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #11371 > unrolled thread
| Started by | Sherlock <sherlock@sherlock.com.au> |
|---|---|
| First post | 2018-02-20 23:13 -0800 |
| Last post | 2018-02-25 12:07 +0100 |
| Articles | 15 — 3 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
BBrowser, celledit, BEDIT_CREATE etc Sherlock <sherlock@sherlock.com.au> - 2018-02-20 23:13 -0800
Re: BBrowser, celledit, BEDIT_CREATE etc "Karl-Heinz" <invalid@invalid.invalid> - 2018-02-21 09:30 +0100
Re: BBrowser, celledit, BEDIT_CREATE etc Sherlock <sherlock@sherlock.com.au> - 2018-02-21 14:57 -0800
Re: BBrowser, celledit, BEDIT_CREATE etc Sherlock <sherlock@sherlock.com.au> - 2018-02-21 16:44 -0800
Re: BBrowser, celledit, BEDIT_CREATE etc Sherlock <sherlock@sherlock.com.au> - 2018-02-21 17:05 -0800
Re: BBrowser, celledit, BEDIT_CREATE etc nicktekhne@googlemail.com - 2018-02-22 02:02 -0800
Re: BBrowser, celledit, BEDIT_CREATE etc Sherlock <sherlock@sherlock.com.au> - 2018-02-22 02:09 -0800
Re: BBrowser, celledit, BEDIT_CREATE etc "Karl-Heinz" <invalid@invalid.invalid> - 2018-02-22 13:33 +0100
Re: BBrowser, celledit, BEDIT_CREATE etc "Karl-Heinz" <invalid@invalid.invalid> - 2018-02-22 14:44 +0100
Re: BBrowser, celledit, BEDIT_CREATE etc "Karl-Heinz" <invalid@invalid.invalid> - 2018-02-22 17:02 +0100
Re: BBrowser, celledit, BEDIT_CREATE etc Sherlock <sherlock@sherlock.com.au> - 2018-02-22 15:55 -0800
Re: BBrowser, celledit, BEDIT_CREATE etc "Karl-Heinz" <invalid@invalid.invalid> - 2018-02-23 08:40 +0100
Re: BBrowser, celledit, BEDIT_CREATE etc Sherlock <sherlock@sherlock.com.au> - 2018-02-23 05:49 -0800
Re: BBrowser, celledit, BEDIT_CREATE etc "Karl-Heinz" <invalid@invalid.invalid> - 2018-02-24 19:50 +0100
Re: BBrowser, celledit, BEDIT_CREATE etc "Karl-Heinz" <invalid@invalid.invalid> - 2018-02-25 12:07 +0100
| From | Sherlock <sherlock@sherlock.com.au> |
|---|---|
| Date | 2018-02-20 23:13 -0800 |
| Subject | BBrowser, celledit, BEDIT_CREATE etc |
| Message-ID | <d146c744-49c3-44fd-8c69-74a9b0403fec@googlegroups.com> |
HI bBrowser experts. Made a column editable so the #Comboedit and a CELL EDIT allows a window to popup for selection [ dialog, database ] and all this works great. The issue is the browser cell allows me to type where I want a Combolistbox type of situation. IN other words I only want to select using from list and NOT BE Able to type in text Thinking how to stop the typing into say the SLE cell of the bBrowser. I hope that makes sense,, and an easy solution. I guess editable is editable and it is allow it.. but needed to click on the Combobox and that all I want to work for data entry. Phil
[toc] | [next] | [standalone]
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Date | 2018-02-21 09:30 +0100 |
| Message-ID | <ff4p5bF9hf7U1@mid.individual.net> |
| In reply to | #11371 |
HI Phil, > Made a column editable so the #Comboedit and a CELL EDIT allows a > window to popup for selection [ dialog, database ] and all this works > great. > > The issue is the browser cell allows me to type where I want a > Combolistbox type of situation. IN other words I only want to select > using from list and NOT BE Able to type in text according to the bBrowser:editcreate() doc i would try: fill param: <symControlClass> with #ComboBox fill param: <uSpecial> with BOXDROPDOWNLIST Because a BOXDROPDOWNLIST has no edit part you can select a value from the combobox list only. regards Karl-Heinz
[toc] | [prev] | [next] | [standalone]
| From | Sherlock <sherlock@sherlock.com.au> |
|---|---|
| Date | 2018-02-21 14:57 -0800 |
| Message-ID | <68f1386b-1d0b-42dd-a6c9-1f0a64d908cc@googlegroups.com> |
| In reply to | #11371 |
On Wednesday, 21 February 2018 18:13:33 UTC+11, Sherlock wrote: > HI bBrowser experts. > > Made a column editable so the #Comboedit and a CELL EDIT allows a window to popup for selection [ dialog, database ] and all this works great. > > The issue is the browser cell allows me to type where I want a Combolistbox type of situation. IN other words I only want to select using from list and NOT BE Able to type in text > > Thinking how to stop the typing into say the SLE cell of the bBrowser. > > I hope that makes sense,, and an easy solution. > > I guess editable is editable and it is allow it.. but needed to click on the Combobox and that all I want to work for data entry. > > Phil
[toc] | [prev] | [next] | [standalone]
| From | Sherlock <sherlock@sherlock.com.au> |
|---|---|
| Date | 2018-02-21 16:44 -0800 |
| Message-ID | <263bbe18-048a-43a3-a070-1a55e783613a@googlegroups.com> |
| In reply to | #11382 |
Karl [greetings.. ] IF oColumn:FieldSym == #PRP_ZCLEAN oEvent:EditControl := oEvent:Control:EditCreate(oEvent:EditCell:Column, oEvent:EditCell:Row, oEvent:EditCell:RecNo, #bShowCreditorBrowser, BOXDROPDOWNLIST) ENDIF Added the BOXDROPDOWNLIST changes nothing. The CELL is editable and Combo type arrow calls a Dialog with bBrowser to pick from a lot of data where a Combobox would choke. The selecting etc all works. The issue is the CELL being editable allows text to be typed. How to stop. Thought you nailed it with Dropdownlist.. but am I doing something wrong with code above. THanks.. Phil
[toc] | [prev] | [next] | [standalone]
| From | Sherlock <sherlock@sherlock.com.au> |
|---|---|
| Date | 2018-02-21 17:05 -0800 |
| Message-ID | <31711782-f811-4ae9-861c-e72d61d5d035@googlegroups.com> |
| In reply to | #11383 |
Karl [greetings.. again ] If you load up sample in bBrowser bComboedit.. bComboEditChoice the situation I have is like this. A cell and dropdown, in this case CITY database you can click to fill cell. See in HELP you can type into cell also, in this example "New York" 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 ? Phil
[toc] | [prev] | [next] | [standalone]
| From | nicktekhne@googlemail.com |
|---|---|
| Date | 2018-02-22 02:02 -0800 |
| Message-ID | <f93f9da2-ab11-42be-a5b1-fc33a72ae02c@googlegroups.com> |
| In reply to | #11384 |
Hi Phil,
Very long time since I've done anything with bBrowser, and I may be getting the wrong end of the stick, but anyway, I have a column that just has a drop down list to select from, defined like this
oColumn := SELF:oDCInstructionListBrowser:GetColumn(#LINKTYPE)
oColumn:Width := 100
oColumn:ViewValueAs := #ComboBox
oColumn:Caption := "Link Type"
oColumn:Captionview:=bViewStyle{,,BALIGN_CENTER}
oColumn:Dataview:=bViewStyle{,,BALIGN_CENTER + BALIGN_VCENTER}
oColumn:EditStartFlags := BESF_ONKEY_RETURN + BESF_ONMOUSE_BUTTONDOWN
oColumn:ValueTransformList := {{" ", 0}, {"PDF file", 1}, {"Image file", 2}, {"Document file", 3}, {"Other file type", 4}, {"Web link", 5}}
Maybe that helps....
Nick
[toc] | [prev] | [next] | [standalone]
| From | Sherlock <sherlock@sherlock.com.au> |
|---|---|
| Date | 2018-02-22 02:09 -0800 |
| Message-ID | <d1288c15-b558-4c34-842b-dca35137ef52@googlegroups.com> |
| In reply to | #11387 |
Nick snip[ Maybe that helps.... ] I 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. I have hacked a work around.. not really what I wanted but gets me moving.The EditstartFlags is interesting to test. ValueTRansformList of combobox items interesting too. A true combobox cannot handle the amount of records to select from though Keep the ideas coming. Phil
[toc] | [prev] | [next] | [standalone]
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Date | 2018-02-22 13:33 +0100 |
| Message-ID | <ff7rm6F87vU1@mid.individual.net> |
| In reply to | #11384 |
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
[toc] | [prev] | [next] | [standalone]
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Date | 2018-02-22 14:44 +0100 |
| Message-ID | <ff7vqeF15jhU1@mid.individual.net> |
| In reply to | #11390 |
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
[toc] | [prev] | [next] | [standalone]
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Date | 2018-02-22 17:02 +0100 |
| Message-ID | <ff8801F30u1U1@mid.individual.net> |
| In reply to | #11392 |
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
[toc] | [prev] | [next] | [standalone]
| From | Sherlock <sherlock@sherlock.com.au> |
|---|---|
| Date | 2018-02-22 15:55 -0800 |
| Message-ID | <4833d81d-d1d0-43ca-9666-510b9b28bd88@googlegroups.com> |
| In reply to | #11393 |
Karl This will work... missed the class inherited from Singlelineedit Sure a Dispatcher would trap what ever you wanted. Also is there a way to know in a bBrowser without checking before and after cells,, that a cell value was changed ? Thanks Karl. Are you using X# and did you use VULCAN ? Phil
[toc] | [prev] | [next] | [standalone]
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Date | 2018-02-23 08:40 +0100 |
| Message-ID | <ff9v4dFej40U1@mid.individual.net> |
| In reply to | #11398 |
Hi Phil,
>
> Also is there a way to know in a bBrowser without checking before and
> after cells,, that a cell value was changed ?
>
Not that i´m aware of. Don´t know if it makes sense that much, but it´s
possible to detect the #CITY control within EditFocusChange()
BTW. oCOntrol:ValueChanged always returns TRUE
METHOD EditFocusChange(oEditFocusChangeEvent) CLASS _dtwComboEdit
LOCAL oControl AS Control
LOCAL lGotFocus AS LOGIC
oControl := IIF(oEditFocusChangeEvent == NULL_OBJECT, NULL_OBJECT,
oEditFocusChangeEvent:Control)
lGotFocus := IIF(oEditFocusChangeEvent == NULL_OBJECT, FALSE,
oEditFocusChangeEvent:GotFocus)
SUPER:EditFocusChange(oEditFocusChangeEvent)
//Put your changes here
IF oControl:namesym == #city
SELF:Caption := Symbol2String ( oControl:namesym ) + " " + AsString
(oControl:ValueChanged) + " " + oControl:Value + " " + AsString (
lGotFocus )
ENDIF
RETURN NIL
>
> Are you using X# and did you use VULCAN ?
>
i bought vulcan 1.0 years ago, but never used it in deepth. X# is defintly
on my list, but currently i still have to struggle 24 hours a day with VO
;-)
.
regards
Karl-Heinz
[toc] | [prev] | [next] | [standalone]
| From | Sherlock <sherlock@sherlock.com.au> |
|---|---|
| Date | 2018-02-23 05:49 -0800 |
| Message-ID | <f1014061-3368-42bc-a226-2fe6f2b8aef3@googlegroups.com> |
| In reply to | #11402 |
Karl EFC... no good I have not changed focus.. One improvement in the Dispatch method would be to simulate the Combobox automatically as though mouse click on it. Outside of that it is good. snip[ > i bought vulcan 1.0 years ago, but never used it in deepth. X# is defintly on my list, but currently i still have to struggle 24 hours a day with VO ] VO was treating me well and .NET not need but we use XAMARIN for Phone/Tablet development we have other systems in C# which we run directly in MONO and Linux. Has anybody used say X# code in MONO will it run ? I got a price during year of Robert for X# and wanted my new RYZEN 1700 machine first. Neat.. Are others using Ryzen. Good to AMD back in there giving INTEL a run for there money. Phil
[toc] | [prev] | [next] | [standalone]
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Date | 2018-02-24 19:50 +0100 |
| Message-ID | <ffdr62FatanU1@mid.individual.net> |
| In reply to | #11408 |
Hi Phil,
> One improvement in the Dispatch method would be to
> simulate the Combobox automatically as though mouse click on it.
on mouseclicks the sle behaves now the same way as the dropdown glyph does.
Another enhancement is that you can now open the choice list with the key F4
too. A final solution would be to enhance the bBrowser class
bComboEditChoice with the possibility to close the choice list not only with
ESC but with F4 too. But that´s what i leave to you ;-)
------------------------
METHOD Dispatch ( oEvent ) CLASS bCityEdit
DO CASE
CASE oEvent:message == WM_KEYDOWN .OR. oEvent:message == WM_CHAR
IF oEvent:wParam == VK_F4
SELF:OnChoiceOpen()
ENDIF
RETURN SELF:EventReturnValue := 1L
CASE oEvent:message == WM_LBUTTONDOWN
IF ! lChoiceOpen // protect var from the bBrowser class bComboEdit
SELF:OnChoiceOpen()
ENDIF
RETURN SELF:EventReturnValue := 1L
CASE 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 )
regards
Karl-Heinz
[toc] | [prev] | [next] | [standalone]
| From | "Karl-Heinz" <invalid@invalid.invalid> |
|---|---|
| Date | 2018-02-25 12:07 +0100 |
| Message-ID | <fffjneFmhl8U1@mid.individual.net> |
| In reply to | #11423 |
Hi Phil,
Annoying is that it´s currently neccessary to click three times to open the
choice list. Now, each time the Edit control is created the choice list is
automaticly openend by a PostMessage() call within the CellEdit().
---------------
METHOD CellEdit(oEvent) CLASS dtwComboEdit
LOCAL oColumn AS bDataColumn
DO CASE
CASE 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)
PostMessage ( oEvent:EditControl:handle() , WM_User + 1 , 0 ,
0L ) // <------------------
ENDIF
ENDCASE
RETURN NIL
---------------------------------
METHOD Dispatch ( oEvent ) CLASS bCityEdit
...
CASE oEvent:message == WM_USER + 1 // <----------
SELF:OnChoiceOpen()
....
-------------------------------------
regards
Karl-Heinz
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web