Jump to content

erich.wanker

uniGUI Subscriber
  • Posts

    867
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by erich.wanker

  1. Hello Farshad Mohajeri - very nice greetings from Austria :-) the loop is 80 ... a small list ... i hope - there is a way to increase the speed ..
  2. Hello Oliver, thank you for your help - the "hoverbutton" CSS works fine ! :-) .. thanks .. and the "hoverpanel" CSS works NOW also fine - if i use: my_uniPanel_01.ClientEvents.ExtEvents.Add ('OnAfterrender=function OnAfterrender(sender)'+ ' {document.getElementById(sender.body.id).className ="hoverpanel"; }'); ..the wrong syntax i used was: my_uniPanel_01.ClientEvents.UniEvents.Add ('OnAfterCreate=function OnAfterCreate(sender)'+ ' {sender.cls="hoverpanel"; }'); Thanks again and nice greetings :-)
  3. Hello folks, i am playing with runtime-created components ...but the create-performance is very slow .. What can i do to optimize the following codelines ? Thanx for helping :-) Erich procedure TtestFrame(wo_01:TUniPanel); begin // CREATE THE MAIN UNIPANEL my_structure_01:=tuniPanel.Create(self); my_structure_01.Parent:=wo_01; my_structure_01.Left:=0; my_structure_01.Width:=wo_01.Width; my_structure_01.Top:=abstand_01; my_structure_01.Height:=wo_01.Height-my_structure_01.Top; my_structure_01.ShowCaption:=false; my_structure_01.BorderStyle:=ubsNone; my_structure_01.Color:=normal_rgb_01; //clwhite; // DATABASE LOOP unimainmodule.ZVERTRAG.first; while not unimainmodule.ZVERTRAG.Eof do begin // USE A PANEL AS ONE RECORD my_uniPanel_01:=tuniPanel.Create(my_structure_01); my_uniPanel_01.Parent:=my_structure_01; my_uniPanel_01.Left:=0; my_uniPanel_01.Width:=my_structure_01.Width; my_uniPanel_01.Top:=position_01; my_uniPanel_01.Height:=hoehe_01; my_uniPanel_01.Caption:=unimainmodule.ZVERTRAG.fieldbyname('STRUCTURE_NR').AsString; my_uniPanel_01.Tag:=unimainmodule.ZVERTRAG.fieldbyname('STRUCTURE_NR').AsInteger; my_uniPanel_01.OnClick:=my_panel_click_01; my_uniPanel_01.ShowCaption:=false; my_uniPanel_01.BorderStyle:=ubsNone; my_uniPanel_01.Cursor:=crHandPoint; my_uniPanel_01.Name:='MY_01_'+unimainmodule.ZVERTRAG.fieldbyname('STRUCTURE_NR').AsString; my_uniPanel_01.ClientEvents.ExtEvents.Add ('OnAfterrender=function OnAfterrender(sender)'+ ' {document.getElementById(sender.body.id).className ="hoverpanel"; }'); my_uniPanel_01.ClientEvents.UniEvents.Add ('OnAfterCreate=function OnAfterCreate(sender)'+ ' {sender.cls="myUnselectable"; }'); // A SMALL IMAGE my_uniimage_01:=TuniImage.Create(self); my_uniimage_01.Parent:=my_uniPanel_01; my_uniimage_01.Picture.LoadFromFile(uniServerModule.FilesFolderPath+'folder_orange_leer.gif'); my_uniimage_01.Width:=18; my_uniimage_01.Height:=16; my_uniimage_01.Left:=5; my_uniimage_01.Top:=1; my_uniimage_01.Name:='IMG_01_'+unimainmodule.ZVERTRAG.fieldbyname('STRUCTURE_NR').AsString; my_uniimage_01.Tag:=unimainmodule.ZVERTRAG.fieldbyname('STRUCTURE_NR').AsInteger; // A LABEL my_uniLabel_01:=TuniLabel.Create(my_uniPanel_01); my_uniLabel_01.Parent:=my_uniPanel_01; my_uniLabel_01.Left:=30; my_uniLabel_01.AutoSize:=false; my_uniLabel_01.Width:=270; my_uniLabel_01.Top:=3; my_uniLabel_01.Name:='LAB_01_'+unimainmodule.ZVERTRAG.fieldbyname('STRUCTURE_NR').AsString; my_uniLabel_01.Caption:=unimainmodule.ZVERTRAG.fieldbyname('OBJECT_NAME').AsString; my_uniLabel_01.Cursor:=crHandPoint; my_uniLabel_01.Font.Color:=text_rgb_01; my_uniLabel_01.Tag:=unimainmodule.ZVERTRAG.fieldbyname('STRUCTURE_NR').AsInteger; my_uniLabel_01.ClientEvents.UniEvents.Add ('OnAfterCreate=function OnAfterCreate(sender)'+ ' {sender.cls="myUnselectable x-dbtext300-user"; }'); // A BUTTON my_unibutton_01:=TUniButton.Create(self); my_unibutton_01.Parent:=my_uniPanel_01; my_unibutton_01.Width:=100; my_unibutton_01.Caption:='Eintrag löschen'; my_unibutton_01.Name:='BTN_01_'+unimainmodule.ZVERTRAG.fieldbyname('STRUCTURE_NR').AsString; my_unibutton_01.Align:=alRight; my_unibutton_01.Visible:=true; my_unibutton_01.Tag:=unimainmodule.ZVERTRAG.fieldbyname('STRUCTURE_NR').AsInteger; my_unibutton_01.OnClick:=my_button_click_01; my_unibutton_01.ClientEvents.UniEvents.Add ('OnAfterCreate=function OnAfterCreate(sender)'+ ' {sender.cls="hoverbutton"; }'); // CALCULATE NEXT POSITION position_01:=position_01+hoehe_01; unimainmodule.ZVERTRAG.next; end;// EOF end;
  4. Hello, i have a unipanel .. in the unipanel i have a uniLabel (Database record value) and a uniImage (image with a "delete" icon) ... MY CSS QUESTION: if the mouse is over the unipanel, the color of the unipanel should change from white to silver AND the image should be visible (and Clickable) if the mouse leaves the uniPanel, the color of the unipanel should be white and the uniImage should NOT be visible this runtime assigned functions are not a problem: if the user clicks on the panel, a showmessage should come if the user clicks on the image, a "will you delete.."-message should come AND A DELPHI QUESTION: i also have a problem with my tests: if i click the image witch is in the uniPanel, both funktions are starting - so i see the uniPanel.onClick AND the uniImage.onClick message ???? i am not good with javascript and css - can someone please help me with this "liitle" problem ? ThanX Erich i think - if i create every effect in ClientEvents/ ExtEvenst or UniEvents (mouseEnter, MouseLeave..) - the performance is very slow - i think, a class name for the Panel and the definition in ServerModule / Custom CSS is the right solution ? All the uniPanels are created at runtime ..i define a class name since now in this way: function OnAfterCreate(sender) { sender.cls = 'css-class-name'; } the image Visible/ not visible function i made with delphi - this function would be cool as a CSS Style thing: (every UniPanel has a unique TAG value ) procedure Tdata_ver.my_UniPanelMouseEnter( Sender: TObject); var i:Integer; begin i:=(sender as TUniPanel).tag; (FindComponent('loeschimage'+inttostr(i)) as TUniImage).Visible:=true; end; procedure Tdata_ver.my_UniPanelMouseLeave( Sender: TObject); var i:Integer; begin i:=(sender as TUniPanel).tag; (FindComponent('loeschimage'+inttostr(i)) as TUniImage).Visible:=false; end;
  5. i would like to have a "not selectable" propertie of components... in Webmode a lot of components should not be selectable ... a automaticaly css-style like: .myUnselectable{ user-select: none; -o-user-select:none; -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -ms-user-select: none !important; } Thanks :-) Erich
  6. hello users, if someone was the same problems (because of wrong software concept..) - there is a cool function: Servermodule / Objectinspector / Properies / SuppressErrors .. errObjectNotFound = true solves the problem for me :-) ThanX erich
  7. i would like it - if the server is not accessible that ALL uniTimer will automatically disabled on clientside ... a lot of situations are given to lose connection - but the clientside running timers are running endless ... Thanx Erich
  8. Hello, i would like it - if every uniGui Component has a "Classnames" Stringfield in" Objectinspector / properties" as example: i enter in my uniGui-Testapplication in Font / Name ... "Roboto, Tahoma" .. and works easy, fat and simple .. if its possible for class names allso - this would be great ! :-) Thanx Erich PS.: a better solution would be a "ClassNames normal" and a "ClasNames_hover" property ... so i must not click on clientsEvents / ExtEvents / Funktion .. and write Code like: function OnBeforerender(sender) { sender.cls='menupanel-normal'; sender.overCls='menupanel-over'; }
  9. thank you - works perfect :-) .... nice greetings from austria ... erich
  10. hi, i want to hide the x scrollbar of a uniScrollbox & scrolling to top-position... the "overflow-x: hidden" - works perfect, but i can not scroll to the top ??? whats wrong with my code - any ideas ? ThanX Erich UniHTMLFrame1.HTML.Append('<html><head><title>scoller</title>'); UniHTMLFrame1.HTML.Append('<style type="text/css"> DIV#' +UniScrollBox1.JSName+ '_id> DIV {overflow-x: hidden !important;}</style>'); [ THIS WORKS ] UniHTMLFrame1.HTML.Append('<script type="text/javascript">'); UniHTMLFrame1.HTML.Append('function tothetop () {'); UniHTMLFrame1.HTML.Append(' ' +UniScrollBox1.JSName+'_id-body.scrollTo(0, 0);'); UniHTMLFrame1.HTML.Append('}'); UniHTMLFrame1.HTML.Append('</script>'); UniHTMLFrame1.HTML.Append('</head>'); UniHTMLFrame1.HTML.Append('<body onload="tothetop()">'); UniHTMLFrame1.HTML.Append('</body></html>'); p.s.: i tryed out - but didn´t help: UniScrollBox1.JSName+' UniScrollBox1.JSName+'_id UniScrollBox1.JSName+'_id-body and: UniHTMLFrame1.HTML.Append('function tothetop () {'); UniHTMLFrame1.HTML.Append('document.getElementById("'+UniScrollBox1.JSName+'_id").scrollTo(0, 0);'); UniHTMLFrame1.HTML.Append('}');
  11. thanx Farshad for the hint ... is there a way to secure this problem with javascript ? .. something like: if component is clicked - then disable the component on clientside immediately .. so the second click (when user makes falsely a doubleklick) will not have effect .. a mouseOut will not generate .. i would need it for uniPanels and uniImages .. something like: onKlick -> first disable the component -> and make the onClick procedure .. Erich
  12. Hello, i have a lot of components with Events .. and in some situations - i get an error (object timed out ...) as example ... a uniPanel has events: OnClick - to load a other uniFrame OnMouseEnter - to change the color and refresh some labels OnMouseLeave - to change the color and set infolabel.visible:=false; if i click the panel, i free the current frame and load a other ... but then onMouseLeave-Event tryes to change the color of the uniPanel ... and here is my problem... ! i try to find a solution like: if user clicks on uniPanel - then first clear all events of this panel and then do the procedure .. but my test with: OnMouseLeave:=nil; mainform.InsertFrame1('Tnavigation_angemeldet',mainform.display_area1); does not solve the problem .. the "nil" has no effect .. has anybody a idea - that i can do ? Thanx Erich
  13. 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; }
  14. 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
  15. Hello Users, i am playing with uniCalendarPanel .. And i have a littel problem: I put a uniCalendarPanel on a Frame The Frame is loaded via: procedure TMainForm.InsertFrame1(Name: string;wo:TuniPanel); begin if FFrameName1=Name then Exit; FFrameName1:=Name; FreeAndNil(FCurrentFrame1); FCurrentFrame1:=TUniFrameClass(FindClass(Name)).Create(self); FCurrentFrame1.Align:=alClient; FCurrentFrame1.Parent:=wo; end; FIRST loadl of Frame with uniCalendarPanel works normal.. if i load a other frame and load the Calendar-Frame again - the uniCalendar does not work .. since i load the uniGui -DLL new.. the attached Picture shows on the left side the "normal" RangeSelect -funktion ... on the right side you can see the same testselection .. but the RangeSelect is not displayed .. just one small gray pixel is shown .. p.s.: the frame with the uniCalendarPanel has no programming codes ... i just drag and dropped the uniCalendarPanel on the frameform for testing .... Any Ideas ? Erich
  16. in the mean time - i made it with delphi ... javascript is not a strangth of me ;-) ... procedure my_panel_click ... for i:=0 to (sender as TuniPanel).ComponentCount-1 do begin if (sender as TuniPanel).Components[i].ClassName= 'TUniImage' then begin if ((sender as TuniPanel).Components[i] as TUniImage).Name = 'IMG'+inttostr((sender as TuniPanel).tag) then begin if ((sender as TuniPanel).Components[i] as TUniImage).Tag = 0 then begin ((sender as TuniPanel).Components[i] as TUniImage).Tag:=1; ((sender as TuniPanel).Components[i] as TUniImage).Picture.LoadFromFile(uniServerModule.FilesFolderPath+'folder_orange_voll.gif'); end else begin ((sender as TuniPanel).Components[i] as TUniImage).Tag:=0; ((sender as TuniPanel).Components[i] as TUniImage).Picture.LoadFromFile(uniServerModule.FilesFolderPath+'folder_orange_leer.gif'); end; end; end; end; this in javascript would be nice ;-) .. better performance .. Nice greetings erich
  17. [Webmode] Hello, i am trying to make a little selfmade Grid at runtime ;-) at runtime i create uniPanels - every unipanel has a unique tag value ...the name is PNL + the unique Number every unipanel has a uniImage - the uniImage has the same tag value like the parent uniPanel ... the name is IMG + the unique Number Now i want to "select" a panel with a single click .. and the picture of the uniImage should be changed to "select.gif" .. and a second click should change the picture to "noselect.gif" And with a double click - i want to show informations of the doubleclicked record Can someone help me with this ? ThanX Erich
  18. [Webmode] Hello, i am trying to create a selfmade "databaseList" what i have since now works "normal" and fast .. but how should i handle "marked entries" ? i want to "select" a panel with single click .. (change the image which is in the panel) i want to "open" a record with doubleclick (i lose the doubleclick funktion with tests of "select" .. the first click will be stolen for the "select" funktion) not important but nice: i want to navigate with keyboard AND ... my javascript and css knowHow is very bad :-( Thanx for helping Erich ************************************************************************************ i create uniPanels at runtime .. the TAG value of my_uniPanel is the unique recordNr. of the current record while not unimainmodule.ZTabelname.Eof do begin my_uniPanel:=tuniPanel.Create(my_structure); i define Single AND DoubleClick on the panel my_uniPanel.OnDblClick:=my_panel_dbclick .... same for single click i define "hover effects" for the "rows" 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"); }'); i create a image in every unipanel.. my_uniimage:=TuniImage.Create(my_uniPanel); i create a uniLabel for the text ... my_uniLabel.caption is filled with database values ... my_uniLabel:=TuniLabel.Create(my_uniPanel); my_uniLabel.Parent:=my_uniPanel; i give the uniLables a css class.. my_script:='OnAfterCreate=function OnAfterCreate(sender) '+ '{ '+ ' sender.cls="x-dbtext100-user";'+ '} '; my_uniLabel.ClientEvents.UniEvents.Add(my_script);
  19. Hello Farshad Mohajeri, nice greetings from Gastein village. 2 shirt questions and a suggestion ;-) Do you know timeline of publishing version 0.94 ? Is the performance of 0.94 higher when 0.93 ? Iis where a possibility for a uniDBCtrlGrid like Delphi7 in the future ? ... i think a component like this would be perfect ;-) Thanks for your response and all the best Erich
  20. hello, i want to create a "line of links" with a lot of uniLabels (created at runtime, uniLabel.top is allways the same value - just "left" is ascending..): every uniLabel caption is created depending on db-records (while not query.eof do ..) every uniLabel becomes a "onMouseDown" event .. BUT: i need the lenght in pixel of a runtime-created uniLabel - to set the correct left-value of the next uniLabel ... Any Ideas ? ThanX
  21. Hello Chefdackel ;-) yes, i use the "gray-theme" as basic-setting in the application ... all showmodal-forms have the same gray-value ... datatimepicker and so on are all in the gray-style and matches very well with the rest of the userinterface ... greetings
  22. Hello, how can i define the css class name of a uniLabel created at runtime ? my_uniLabel = TuniLabel create .... ThanX
  23. i use no "theme" .. ;-) i just use a lot of uniPanels without borders .. i gave every "uniPanel" a tag-value ( 1 is background / 2 is foreground1 / 3 is foreground2 ..ect) to change the colors of the unipanles - i search for unipanels with tag = x and change the color ... it would be noce to see your userinterfaces ;-) erich
  24. hello lema and roberto .. thanks for your writing i use a lot of uniPanels ;-) .. without borders .. and robertos demo looks very good and is very fast !!
×
×
  • Create New...