How to Block Double Click on Browse List using Alert Key?

Hello forum.
I need to block the “double click” in a List Box that is in a Bowse. I already tried with the Alert - “MouseKey2” in the List Box properties, without adding embedded code in the “AlertKey” event.
If anyone can help me with this problem I would appreciate it, and sorry if my query is not well formalized.
A cordial greeting.

Is this ABC or Legacy?

Both Alert MouseLeft2 and process it so your Alert will not do anything. I suppose you could remove the alert with a loop something like

LOOP K=1 TO 255
  IF ?Browse{PROP:Alrt,K}=MouseLeft2 THEN ?Browse{PROP:Alrt,K}=0.

I wouldn’t do that incase some other code added it back. I’d find the Browse Double Click handler and put code there.

1 Like

Can you explain what purpose you’re trying to achieve?

If you look at abbrowse.clw, you can see that it does a lot of stuff with MouseLeft2, so alerting it explicitly would not help your situation.

In ABC, if you’re just trying to prevent updates, there are other ways to do that.

I think all you have to do is set the Browse.ChangeControl to zero, but I could be wrong. It’s been a while since I’ve used it.

Mr. CarlBarnes
Good day.
Thank you for your response, and sorry for not clarifying, I’m with “ABC”. I am very inexperienced in Clarion and it is difficult for me to adapt.
The embedded code that provides me in which event should I copy it!!!??
It would be helpful if you could guide me in this case.
Very thankful.
Best regards and thank you very much, again.

Mr. jslarve.
Thank you very much for the prompt response.
I’m working with Clarion 8 and using “ABC”; What I want to do is within a Browse to block the “double click” of the List Box so that the end user cannot directly access the Fom in “Update” mode. What I’m looking for is that the record can be marked but that “double clicking” with the mouse does absolutely nothing.
I thank you again for your cordial greeting.

What I would try is:

  1. Look at your window structure and find the buttons that are used for “Insert”, “Change”, and “Delete”.
  2. Take note of the Field equate labels, such as ?ChangeButton, or ?Change, or ?InsertButton, or whatever they are called.
  3. In the browse template, take note of the label of your Browse object. E.G. “BRW1” or whatever it is called. I will call it “YourBrowseObject” in the example below, but you use your actual object name.
  4. In situations where you want to disable either Insert, Change, or Delete:
   YourBrowseObject.InsertControl = 0
   YourBrowseObject.ChangeControl = 0
   YourBrowseObject.DeleteControl = 0
  1. If you want to re-enable any of those features:
  YourBrowseObject.InsertControl = ?YourInsertButton
  YourBrowseObject.ChangeControl = ?YourChangeButton
  YourBrowseObject.DeleteControl = ?YourDeleteButton

It’s kind of hokey, but that should do what you want.


You don’t need to alert MouseLeft2, it is already alerted.

In the embeds for the list, AlertKey, Before the parent call, add…

IF KEYCODE() = MouseLeft2
  MESSAGE('Hit DoubleClick ' & TEA:LastName)
  IF SUB(TEA:LastName,1,1) = 'B' ! Or whatever condition you have
    CYCLE    ! Don't call the update procedure

Mr. jslarve
Good day.
Regarding his comment “It’s kind of hokey, but that should do what you want.” I don’t agree at all with what you say. For a beginner like me, it is knowledge and I am very grateful to you, because I know that time is money and you dedicated that time to answer me.
I am going to put into practice what you tell me and later I will tell you if it worked for me.
I wish you a good day.
A cordial greeting.

Hola Pablo !

Pudiste hacer funcionar el código que te pasaron los colegas ?

Sabias que hay un grupo de Clarion en español en Skype ?

Cualquier duda a tu disposición.

Un cordial saludo,
Fernando Laborda

Google Translate:

Hi, Pablo !

Were you able to make the code that your colleagues gave you work?
Did you know that there is a Clarion group in Spanish on Skype?
We are at your order for any question.

Best regards,
Fernando Laborda

Hola cuasimoto, buenas tardes.
Si efectivamente pude hacer funcionar el código es más a la respuesta de jslarve le hice una mención y tilde la solución.
Y la verdad no tengo Skype.
Lo que si me gustaría en algún momento hacer un curso de Clarion.

Buenas noches Pablo!

Mi nombre es Fernando .

Ok. Cualquier duda avisame.

Cursos de Clarion, hasta donde yo se, no hay de la manera que uno podría encontrar en otros lenguajes. Salvo algunos pocos vídeos que vi en YouTube subidos por gente de Clarion Brasil.

Pero en el grupo que mencioné hay usuarios que hacen, con mucha vocación y dedicación , webinarios semanales gratuitos sobre gran diversidad de temas y están disponibles para repetir ya que se graban y publican.

Además, estamos casi todo el día consultando por dudas o ayudando a otros a resolver diversas situaciones que se dan en el trabajo diario.

Si te interesa podés abrir una cuenta de Skype y unirte de manera gratuita . Hay usuarios muy experimentados, y otros que no tanto, así que hay diversidad de niveles y ninguna consulta se desmerece.

Si estas usando Clarion de manera frecuente no se pierde nada sino todo lo contrario.
Buena onda y ganas de ayudar de parte de usuarios hispano hablantes de Clarion de todas partes del mundo.

Te dejo un cordial saludo y a tu disposición para lo que necesites.

Fernando Laborda
Rosario, Argentina.

1 Like

Buen día
Muchas gracias Fernando aprecio mucho su información.
tratare de conectarme.
Un cordial saludo.