erich.wanker Posted November 4, 2013 Posted November 4, 2013 hello .. i have a little "optical" problem.. i have a uniPanel with doubleClick-Event .. what can i do to eliminate the "blue selected area" .. the browser selects the area of the unipanel and uniLabels on doubleclick ... i tried: serverModule CSS: .myUnselectable{ /* Gecko-based, Mozilla */ -moz-user-select:none; /* Safari */ -khtml-user-select:none; } Create uniPanels at runtime: my_uniPanel:=tuniPanel.Create(my_structure); my_uniPanel.Parent:=my_structure; my_uniPanel.Left:=0; my_uniPanel.Width:=860;; my_uniPanel.Top:=position; my_uniPanel.Height:=hoehe; my_uniPanel.Caption:=unimainmodule.ZVERTRAG.fieldbyname('STRUCTURE_NR').AsString; my_uniPanel.Tag:=unimainmodule.ZVERTRAG.fieldbyname('STRUCTURE_NR').AsInteger; my_uniPanel.OnClick:=my_panel_click; my_uniPanel.OnDblClick:=my_panel_dbclick; my_uniPanel.ShowCaption:=false; my_uniPanel.BorderStyle:=ubsNone; my_uniPanel.Cursor:=crHandPoint; my_uniPanel.Name:='MY'+unimainmodule.ZVERTRAG.fieldbyname('STRUCTURE_NR').AsString; my_uniPanel.ClientEvents.ExtEvents.Add ('OnAfterrender=function OnAfterrender(sender)'+ ' { sender.setBodyStyle("background-color:#FFFFFF"); }'); my_uniPanel.ClientEvents.ExtEvents.Add ('OnMouseout=function Onmouseout(sender)'+ ' { sender.body.applyStyles("background-color:#FFFFFF"); }'); my_uniPanel.ClientEvents.ExtEvents.Add ('Onmouseover=function Onmouseover(sender)'+ ' {sender.body.applyStyles("background-color:#E8E8E8"); }'); my_uniPanel.ClientEvents.UniEvents.Add ('OnAfterCreate=function OnAfterCreate(sender)'+ ' {sender.cls="myUnselectable"; }'); i have also a lot of unicomponents in every uniPanel: my_uniimage:=TuniImage.Create(self); my_uniimage.Parent:=my_uniPanel; my_uniLabel:=TuniLabel.Create(my_uniPanel); my_uniLabel.Parent:=my_uniPanel; any ideas ? ThanX Erich Quote
erich.wanker Posted November 5, 2013 Author Posted November 5, 2013 i got it :-) the error was the CSS: with this it works: .myUnselectable{ user-select: none; -o-user-select:none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -ms-user-select: none; } Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.