Jump to content

Como evito que los captions sean "seleccionables" (RESUELTO)


Luis Devis

Recommended Posts

Hola, soy completamente nuevo con UNIGUI y en el desarrollo web, (vengo de Delphi 6 !!!).

Una cosa muy molesta cuando desarrollo mi aplicacion con UNIGUI es que los captions de los paneles, botones, labels... son seleccionables, el cursor pasa a modo editor y se puede seleccionar su texto, no quiero que eso se pueda hacer  pero... ¿cómo lo evito?

 

Gracias😅

Link to comment
Share on other sites

Al final me pasaron la solución y funciona muuuuy bien.

1º  En el ServerModule pon en su CustomCSS:

*.unselectable {
   -moz-user-select: -moz-none;
   -khtml-user-select: none;
   -webkit-user-select: none;
   -ms-user-select: none;
   user-select: none;
}

2º Ya en la aplicación 

  FLbl := TUniLabel.Create(Self);
  FLbl.Parent := Self;
  FLbl.Font.Size := 20;
  FLbl.Left := 10;
  FLbl.Text := 'Hello There';
  FLbl.JSInterface.JSCall('addCls', ['unselectable']); //<---------
Link to comment
Share on other sites

  • Luis Devis changed the title to Como evito que los captions sean "seleccionables" (RESUELTO)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...