Jump to content

erich.wanker

uniGUI Subscriber
  • Posts

    866
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by erich.wanker

  1. Hy, how can i start a delphi procedure - if the user check/uncheck a column in a undDBGrid? ThanX for help 🙂 Erich
  2. i think the group_name_id is the problem?? group_name_id = the index of the field what i want to use for the text .. i become it with for colIdx := 0 to cnt - 1 do begin if Mydbgrid.Columns[colIdx].FieldName = 'gruppe_name' then group_name_id := inttostr(colIdx); end;
  3. HI, i use the javascript to write a text in the group- box-header .. now i want the value of grouped records in the group header text -> the two "return" of the javascript should end with "(" + gpCounter +")" + group name 1 (3) - 1st record of the group - 2nd record of the group - 3rd record of the group + group name 2 (2) - 1st record of the group + group name 3 (1) - 1st record of the group
  4. Hi .. i have 1 question: 1.) how can a add the number of records of a group in the group header in following lines? Mydbgrid.ClientEvents.UniEvents.Add('beforeInit=function beforeInit(sender, config)'+ '{ '+ ' config.groupingFeature = Ext.create('+#39+'Ext.grid.feature.Grouping'+#39+',{ '+ ' groupHeaderTpl:new Ext.XTemplate('+#39+'{[this.getGroupTitle(values.rows[0])]}'+#39+','+ ' { '+ ' getGroupTitle: function(values) {'+ ' if(values.data['+group_name_id+']=='+#39+''+#39+')'+ ' return '+#39+'All Records without Group'+#39+';'+ ' else '+ ' return '+#39+'Group name: <b>' + #39 + '+values.data[' + group_name_id + ']).replace(/[&\/\\#,+()$~%.":*?<>{}]/g, "");' + #39 + '</b>' + #39 + '; ' + ' } '+ ' })'+ ' });'+ ' config.features= [config.groupingFeature]; '+ ' } '); to find the ID of the "gruppen_name" i use: group_name_id := '0'; cnt := Mydbgrid.Columns.Count; for colIdx := 0 to cnt - 1 do begin if Mydbgrid.Columns[colIdx].FieldName = 'group_name' then group_name_id := inttostr(colIdx); end; ThanX for help erich
  5. hi x11 you can use a onClick-ExtEvent of a button or somwthing else ... works also .. the security-system of a modern browser blocks this dirty solution - if you just want to start this code without user-interaction .. this means: the user must make a physical touch (or click with a mouse) - the event is fireing .. and in the event where is just the above code ..
  6. Hello, if my unigui app is running in Android Chrome Browser - it calls the barcodescanner-app - and the barcodescanner-app goes back to the chrome-browser...EVERYTHING works fine ! if the same unigui app is installed as PWA - the barcodescanner-app starts the Chromebrowser with the url of my app - and does not go back to the PWA I USE : i found following solution here in the forum to scann a barcode: 1. install https://play.google.com/store/apps/details?id=com.geekslab.qrbarcodescanner.pro&hl=en 2. create a unigui app -> create a button -> Clientevent -> extevent -> function click(sender, e, eOpts) { getScan(); } and include following code in Mainfor,script: function zxinglistener(e){ localStorage["zxingbarcode"] = ""; if(e.url.split("\#")[0] == window.location.href){ window.focus(); processBarcode(decodeURIComponent(e.newValue)); } window.removeEventListener("storage", zxinglistener, false); } if(window.location.hash != ""){ localStorage["zxingbarcode"] = window.location.hash.substr(1); self.close(); window.location.href="about:blank";//In case self.close is disabled }else{ window.addEventListener("hashchange", function(e){ window.removeEventListener("storage", zxinglistener, false); var hash = window.location.hash.substr(1); if (hash != "") { window.location.hash = ""; processBarcode(decodeURIComponent(hash)); } }, false); } function getScan(){ var href = window.location.href.split("\#")[0]; window.addEventListener("storage", zxinglistener, false); zxingWindow = window.open("zxing://scan/?ret=" + encodeURIComponent(href + "#{CODE}"),'_self'); } function processBarcode(b){ ajaxRequest(MainForm.form,"BARCODE",["value="+b]); } and to display the result: procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); if EventName = 'BARCODE' then mainform.nachricht_click('EAN oder QR Code:' + Params.Values['value']);
  7. Hi short question: What is the different between ISAPI Module vs Apache 2.4 Module?
  8. Hello Wilton_rad, i dont know if it helps - but: https://www.mytechnote.ru/en/creating-iis-cluster-load-balancing-nginx .. is a good starting point in my opinion :-) Nice greetings Erich
  9. Hello Sherzod :-) nice greetings from Austria. If i write a text into the TUniDBHtml Memo - no font family is set for the entered text... When i create a PDF - the standard HTML Text will become "Times New Roman" After i select the text in the TuniDBHTMLMemo and click on "Arial" -> i have a good result in my generated PDF is where any chance to set the "Arial" as Standard-font-family - so the generated souce-code includes this font-family - and the generated PDF knows what font should be used? PS: the used reporting-tool-pdf-component has a default font “fallback” - what i cannot change to a other font - if no font is defined - it uses "Times New Roman" .. like in the old days ;-) ThanX for help Erich
  10. HI .. if i copy a plain-text in a empty TUniDBHTMLMemo - the Text has no font-family (in source-code) ... Can i change this ? ... i would like to have "Arial" as Standard ThanX for Help Eric
  11. solved it :-) ThanX for trying to help !!!!!!!!!!!!!!!!!!!!!!! The error was a other field what i filled with following function (a handmade counter thing..) function TUniMainModule.new_id: Integer; var i: Integer; begin GET_INR.Refresh; <-------- THIS SOLVED MY PROBLEM !!!!!!! i := GET_INR.fieldbyname('id').Asinteger; i := i + 1; GET_INR.Edit; GET_INR.fieldbyname('id').Asinteger := i; GET_INR.Post; Result := i; end;
  12. no .. didnt help ... :-( i tryed allso ValidateUpdateCount=-1 but didnt help
  13. Hello .. i become error "0 record(s) updated. Only one record should have been updated" if user B is add a new record in the same table in which user A has created a new record 1 minute bevore ?? ANY IDEA whats wrong ?? the software works fine in all things - but just if 1 user is working with it ... if more users are working - then "0 record(s) updated error" comes - since the user refreshes the page .. the used libmysql.dll is 5.5.27.0 Databas: mySQL • Version: 5.7.29 - MySQL Community Server (GPL) • connected with: Zeos 7.2.6-stable Connection is in MainModule - All my ZQuery have "wmWhereKeyOnly" as WhereMode and "umUpdateChanged" as UpdateMode (CachedUpdates = false) ShowRecordTypes =[usUnmodified,usModified,usInserted] Code: object ZConnection1: TZConnection ControlsCodePage = cCP_UTF16 AutoEncodeStrings = True Catalog = '' Properties.Strings = ( 'controls_cp=CP_UTF16' 'CLIENT_FOUND_ROWS=1' 'AutoEncodeStrings=ON') TransactIsolationLevel = tiReadCommitted HostName = '' Port = 3306 Database = 'datenbank' User = 'karotte' Password = '' Protocol = 'mysqld-5' LibraryLocation = 'C:\Server\htdocs\libmysql.dll' Left = 52 Top = 28 end
  14. WOW .. THANX a lot :-) ... works perfect !!!! i stored it in "onFrameCreate" and search the right index number gruppenname_id:='0'; cnt := Mydbgrid.Columns.Count; for colIdx := 0 to cnt - 1 do begin if Mydbgrid.Columns[colIdx].FieldName = 'gruppenname' then gruppenname_id:= inttostr(colIdx); end; Mydbgrid.ClientEvents.UniEvents.Add('beforeInit=function beforeInit(sender, config)'+ '{ '+ ' config.groupingFeature = Ext.create('+#39+'Ext.grid.feature.Grouping'+#39+',{ '+ ' groupHeaderTpl:new Ext.XTemplate('+#39+'{[this.getGroupTitle(values.rows[0])]}'+#39+','+ ' { '+ ' getGroupTitle: function(values) {'+ ' if(values.data['+gruppenname_id+']=='+#39+''+#39+')'+ ' return '+#39+'All the ungroupt Things are here :-) '+#39+';'+ ' else '+ ' return '+#39+'Gruppenname: '+#39+'+values.data['+gruppenname_id+']; '+ ' } '+ ' })'+ ' });'+ ' config.features= [config.groupingFeature]; '+ ' } ');
  15. HI, in a table - i have a lot of persons - and 50% are in different categories - 50% are in no category (must be a empty database field !!) i use TUniDBGrid - Grouping with Fieldname "category-Name" and FieldCapture "Category-Name" Works fine ! :-) BUT: I want change the caption of group header to "Persons without Categories" if the "category-Name" is empty ??? Actual i have a uniDBGrid like this + Category-Name: <- here are all Records without Category + Category-Name: FisteCategoryDescription + Category-Name: SecondCategoryDescription + Category-Name: and so on ... I want a uniDBGrid like this + Persons without Categories + Category-Name: FisteCategoryDescription + Category-Name: SecondCategoryDescription + Category-Name: and so on ... ThanX Erich
  16. hi.. i must convert a html (mysql field:longtext) to rtf .. because my printing component can not print html (just rtf .. ppRichTextMemo) .. the report is very complex and i just search a convert-posibility.. i found: https://www.swissdelphicenter.ch/de/showcode.php?id=1823 .. but for this i need aTRichText Componente . How can i use this code in a UniGui-App? .. any Ideas?? ThanX for suggestions Erich
  17. WOW ... !!!!!!! thank you VERY VERY MUCH !!! nice greetings erich
  18. Hy Sherzod :-) nice greetings from austria ... thanX .. now i understand :-) i can set the toolbar invisible - and create my own needed buttons .. OK ... sorry for my stupidity.. ;-) Now i have a new problem: where can i find all possible commands...? UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for bold***** ']); UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for italian***** ']); UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for Red font color ***** ']); UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for bigger font ***** ']); UniHTMLMemo1.JSInterface.JSCall('execCmd', [' *****for smaller font ***** ']); ....
  19. Hy Sherzod :-) thanx for answer - BUT ..;-) it has nothing to do with the question :-) i need a uniHTMLMemo with JUST 1 Font, 2 Colors(black and red) .. and text-manipulation for (bold, cursive, underline, bigger and smaller) ThanX for infos Erich
  20. Hi .. is it possible to reduce the toolbar functions with some javascript-code ???: i need: just 1 font (Arial) just 2 colors (black and red) Textfunctions: bold, cursive, underline, bigger and smaller Hope someone can help :-) ThanX Erich
  21. how can i change the white uniHTMLMemo to rgb(234,234,234); ThanX for Help Erich
  22. hmmm .. does somebody knows how to change the startup-color ??? i tryed so much - but nothing helps .. .x-desktop { background-color: #282d32 !important;} .x-body { background-color: #282d32 !important;} ..
×
×
  • Create New...