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)

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...