Jump to content

erich.wanker

uniGUI Subscriber
  • Posts

    867
  • Joined

  • Last visited

  • Days Won

    28

Everything posted by erich.wanker

  1. Hi Sherzod Build: i use 1.50.0.1483 Purpose: i use a lot of animations and different combinations of uniForms, uniFrames and so on .. in one situation - the FileUpload-Dialog is behind the uniForm here a small vid of my UserInterface: ui.webm
  2. Hi.. very important for me: how can i set the z-index of FileUpload-Dialog ..?
  3. hello, for updating my unigui Application - i connect via Teamviewer to client-server stop the apach server service (some times it needs 1seconds - sometimes 30 seconds to stop ??) copy my dll to client server start apache service disconnect the teamviewer now i want to have a automatic update system ... :-) has someone a good idea or a solution out where? thanX Erich
  4. hy .. how can i hide the scrollbar of uniDBGrid and show it only if the mous is on the uniDBGrid? ThanX Erich i have a solution for a uniscrollbox - but i have no idea what to change for use in uniDBGrid: function afterrender(sender, eOpts){ sender.getEl().dom.style["overflow"]="hidden";} function mouseout(sender, eOpts){ sender.getEl().dom.style["overflow"]="hidden";} function mouseover(sender, eOpts){ sender.getEl().dom.style["overflow"]="auto";}
  5. ... a other "dirty" solution: i can draw a event on the clicked day ... very easy ... Please use a ChromeBrowser to see the video to understand what i mean .... calendar.webm
  6. hi .. same like Freeman35 wants .. in your demo-app i clicked the "6 februar 2019" .. but the user can not see - what date is selected ... the "actual selected date" should be highlighted ....
  7. Hello, how can i change the Background Color of the actual selected day (which i clicked..) in UniCalendarPanel1 - MONTH VIEW ... ? thanX Erich
  8. Hello folks.. in the good old times of Delphi (Delphi3) where was a component called "DBCtrlgrid" Short description: it was like a Panel, where you can place DBImages, DBText, DBRadiobuttons, DBChceclboxes and so on .. you had to define just one panel ... and it was duplicated for every record in a tabel .. IT WAS WONDERFULL :-) is where a similar component out where? thanX Erich
  9. i have tested it with just 10 - 15 columns ... and it works fine for me.. (before every menupoint change - i save the actual settings and load the settings of the new menu-point .. and i have no performance problems...)
  10. ok ... got it :-) Found something simular in a lazarus forum ... and it works perfect :-) // // // Original Code found at: http://forum.lazarus.freepascal.org/index.php?topic=21705.0 // nice greetings .. erich procedure TV_FRAME_VERTRAG_STRUKTUR.StringExplode(s: string; Delimiter: string; Var res: TStringList); Begin res.Clear; res.Text := StringReplace(s, Delimiter, #13#10, [rfIgnoreCase, rfReplaceAll]); End; procedure TV_FRAME_VERTRAG_STRUKTUR.saveGridLayout(Mydbgrid: TuniDBGrid; fileName: string); var lines: TStringList; i: integer; my_visible:String; begin try lines := TStringList.Create; with Mydbgrid do begin for i := 0 to Mydbgrid.Columns.count-1 do begin if Mydbgrid.Columns.Visible = true then my_visible:='true' else my_visible:='false'; lines.Add( IntToStr(Mydbgrid.Columns.Index) + '~ ' + Mydbgrid.Columns.DisplayName + '~ ' + Mydbgrid.Columns.Title.Caption + '~ ' + IntToStr(Mydbgrid.Columns.Width) + '~ ' + my_visible ); end; end; lines.SaveToFile(fileName); finally lines.free; end; end; procedure TV_FRAME_VERTRAG_STRUKTUR.loadGridLayout(Mydbgrid: TuniDBGrid; fileName: string); var lines: TStringList; columnInfo: TStringList; lineCtr: integer; colIdx: integer; cnt: integer; begin try lines := TStringList.Create; columnInfo := TStringList.Create; lines.LoadFromFile(fileName); for lineCtr := 0 to lines.Count-1 do begin if trim(lines[lineCtr]) <> '' then begin StringExplode(lines[lineCtr], '~ ', columnInfo); cnt:=Mydbgrid.Columns.count; // go through all the columns, looking for the one we are currently working on for colIdx := 0 to cnt-1 do begin // once found, set its width and title, then its index (order) if Mydbgrid.Columns[colIdx].FieldName = columnInfo[1] then begin Mydbgrid.Columns[colIdx].Width := StrToInt(columnInfo[3]); Mydbgrid.Columns[colIdx].Title.Caption := columnInfo[2]; if columnInfo[4] = 'true' then Mydbgrid.Columns[colIdx].Visible := true else Mydbgrid.Columns[colIdx].Visible := false; // do the index assignment last! // ignore the index specified in the file. use its line Mydbgrid.Columns[colIdx].Index := lineCtr; //StrToInt(columnInfo[0]); order instead end; // if end; end; end; finally lines.free; if assigned(columnInfo) then columnInfo.free; end; end;
  11. ...send emails with Uigui? i use the indy components (included in delphi) uses ..... IdMessage, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdExplicitTLSClientServerBase, IdMessageClient, IdSMTPBase, IdSMTP, IdText, IdAttachmentFile, IdAttachment, uniMultiItem..... procedure Tsystem_mail.create_mail; var Msg: TIdMessage; Attachment: TIdAttachment; IdSMTP: TIdSMTP; TextPart: TIdText; my_mailtext:TStrings; HtmPart: TIdText; myEncoding : TEncoding; begin if ((UniMainModule.MAILKONTEN.FieldByName('BENUTZERNAME').AsString <> '') AND (UniMainModule.MAILKONTEN.FieldByName('SMTP').AsString <> '') AND (UniMainModule.MAILKONTEN.FieldByName('PORT_SMTP').AsString <> '') AND (UniMainModule.MAILKONTEN.FieldByName('KENNWORT').AsString <> '')) then begin try IdSMTP := TIdSMTP.Create(nil); idSMTP.Username :=UniMainModule.MAILKONTEN.FieldByName('BENUTZERNAME').AsString; idSMTP.Password :=UniMainModule.MAILKONTEN.FieldByName('KENNWORT').AsString; idSMTP.Host :=UniMainModule.MAILKONTEN.FieldByName('SMTP').AsString; idSMTP.Port :=UniMainModule.MAILKONTEN.FieldByName('PORT_SMTP').AsInteger; Msg := TIdMessage.Create(nil); Msg.From.address :=UniMainModule.MAILKONTEN.FieldByName('ANTWORTADRESSE').AsString;; Msg.Recipients.EMailAddresses := uniedit1.Text; Msg.CCList.EMailAddresses := uniedit4.Text; Msg.BccList.EMailAddresses := uniedit3.Text; Msg.Subject:= uniedit2.Text; Msg.ContentType := 'multipart/mixed; charset="utf-8"'; Msg.ClearBody; UniMainModule.ANHANG.First; if UniMainModule.ANHANG.recordcount > 0 then begin while not UniMainModule.ANHANG.Eof do begin if fileexists(UniMainModule.ANHANG.FieldByName('PFAD').AsString) then TIdAttachmentFile.Create(Msg.MessageParts, UniMainModule.ANHANG.FieldByName('PFAD').AsString); UniMainModule.ANHANG.next; end; end; // Anhang löschen UniMainModule.ANHANG.First; while not UniMainModule.ANHANG.Eof do begin UniMainModule.ANHANG.Delete; UniMainModule.ANHANG.First; end; if UniHTMLMemo1.Lines.Text <> '' then begin HtmPart := TIdText.Create(Msg.MessageParts, nil ); HtmPart.ContentType := 'text/html; charset="utf-8"'; htmpart.Body:=UniHTMLMemo1.Lines; end; try idSMTP.Connect(); idSMTP.Send(Msg); mainform.nachricht('eMail send ...'); except on e:Exception do ShowMessage('Message Error -> '+e.message); end; finally if idSMTP.Connected then idSMTP.Disconnect(); IdSMTP.Free; HtmPart.Free; Msg.MessageParts.Clear; Msg.Free; end; end else begin mainform.nachricht('Mailkonto ist nicht vollständig konfiguriert'); end; close; end;
  12. Hello folks ;-) Question: How can i give a user following solution: Select fieldnames, what should shown in uniDBGrid at runtime... position change of colums at runtime save this settings - and Load this settings .. has someone a code sniple ??? ThanX Erich
  13. ok... fuck ;-) .. works great :-) ... i played a little bit and it works .. *stunning* procedure TMainForm.create_Broadcast_and_listener; var event_name:String; begin event_name:='MENUE'; UniSession.AddJS('var messageReceiver= new BroadcastChannel("Consumer"); '); UniSession.AddJS('messageReceiver.onmessage = function(event) { ajaxRequest(MainForm.form,'''+event_name+''',[''param0=''+event.data+'''']); } '); end; procedure TMainForm.send_broadcast(event_data:String); begin UniSession.AddJS('var broadcaster = new BroadcastChannel("Consumer"); '); UniSession.AddJS('broadcaster.postMessage("'+event_data+'"); '); end; procedure TMainForm.UniFormCreate(Sender: TObject); begin create_Broadcast_and_listener; end; procedure TMainForm.UniFormAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var parameter_0: String; begin parameter_0 := Params.Values['param0']; if EventName = 'MENUE' then begin showmessage(Params.Values['param0']); end; end; Button.onclick: send_broadcast('Hello World');
  14. Hello, for my UniGui Desktop-Browser App - i search a way to communicate between 2 BrowserTabs ( 2 UniGui-Dll´s on same Domain) Has someone made something with BroadcastChannel API ? - has someone a example or a code snipple? ThanX Erich Demo: https://irekrog.github.io/broadcast-channel-api-simple-example/ Source: https://github.com/irekrog/broadcast-channel-api-simple-example
  15. Hi gerhard.. http://api.jquery.com/animate/
  16. Hi Dominique, i used tweenlite, but replaced it (to mutch problems..) i use now: unisession.AddJS(self.WebForm.JSName + '.animate( { duration: 700, to: { y: ' + inttostr(45) + ' } });'); works fine with components and Forms .. HTH Erich
  17. procedure TMainForm.UniFormCreate(Sender: TObject); var username_string:String; begin username_string :=UniApplication.Parameters.Values['user']; .. ?? is this what you search? HTH Erich
  18. i think you mean this: uniDBGrid - properties: i use a grid with checkboxes ... multiselect .. to find the selected records: s:='-1'; with UniDBGrid1.DataSource.DataSet do for i:=0 to UniDBGrid1.SelectedRows.Count-1 do begin GotoBookmark(UniDBGrid1.SelectedRows.Items); s:=s+','+ UniDBGrid1.DataSource.DataSet.FieldByName('INR').asstring; end; unimainmodule.markierte_anteile:= 'SELECT * FROM ANTEILE WHERE INR IN ('+s+')'; hth erich
  19. Hello .. Used Version: 1.50.0.1480 first of all a video ;-) of the ramdom Error "TUniCustomDBGrid.MoveToRow(): Unexpected Row number:" i dont find a reason or a solution ... ThanX for help or support unexpected_row_number.webm i have this problem which comes randomly ( i found no reason)... right unidbgrid = connected dataSource is "dliste" with dataset "liste" left unidbgrid = connected dataSource is "dstruktur1" with dataset "struktur1" procedure Tkunden_fakturieren.DSTRUKTUR1DataChange(Sender: TObject; Field: TField); var s:string; begin s:= STRUKTUR1.FieldByName('INR').asstring; if s='' then s:='-1'; liste.SQL.Clear; liste.SQL.Append('SELECT * FROM ANTEILE WHERE GUNST_INR = '+s+' AND MANDANT_INR = '+inttostr(unimainmodule.aktueller_mandant_nummer)+' AND FAKTURIERUNG_MONAT = '+#39+fakturierungsmonat+#39+' ORDER BY VERTRAG_NR desc '); liste.Open; the right uniDBGrid has following settings .. nothing special: object UniDBGrid1: TUniDBGrid AlignWithMargins = True Left = 11 Top = 128 Width = 458 Height = 407 Hint = '' Margins.Left = 10 Margins.Top = 10 Margins.Right = 10 Margins.Bottom = 10 ShowHint = True DataSource = Dliste Options = [dgTitles, dgRowSelect, dgCheckSelect, dgAlwaysShowSelection, dgConfirmDelete, dgMultiSelect, dgTabs, dgCancelOnExit] WebOptions.Paged = False WebOptions.PageSize = 50 Grouping.FieldName = 'BENUTZERGRUPPE' Grouping.FieldCaption = #220'bersicht' LoadMask.Enabled = False LoadMask.Message = 'Loading data...' BorderStyle = ubsNone StripeRows = False Align = alClient TabOrder = 4 Columns = < item FieldName = 'EINTRAG' Title.Caption = 'Entsch'#228'digung' Width = 150 Sortable = True end item FieldName = 'SUMME_NETTO' Title.Caption = 'Summe Netto' Width = 70 Sortable = True end item FieldName = 'VERTRAG_NAME' Title.Caption = 'Vertragsname' Width = 150 Sortable = True ImageOptions.Visible = True ImageOptions.Width = 16 ImageOptions.Height = 16 end item FieldName = 'INDEXNAME' Title.Caption = 'Index' Width = 150 Sortable = True end item FieldName = 'ZULETZT_FAKTURIERT' Title.Caption = 'Zuletzt fakturiert' Width = 100 Sortable = True end item FieldName = 'VERRECHNEN' Title.Caption = 'Verrechnen' Width = 100 Sortable = True end item FieldName = 'LEISTUNG_BEGINN' Title.Caption = 'Leistungsbeginn' Width = 100 Sortable = True end item FieldName = 'LEISTUNG_ENDE' Title.Caption = 'Leistungsende' Width = 150 Sortable = True end item FieldName = 'KATEGORIE' Title.Caption = 'Kategorie' Width = 64 Sortable = True end> end end end
  20. Hi, i use 1.50.0.1480 .. i want that ALL checkboxes are checked (multiselect = true) in a unibdGrid after i make a "select * from table" actual i have this (with the posted code) but i want this:
  21. after filtering a table - i want to select all records why does this not work? procedure Tkunden_fakturieren.DSTRUKTUR1DataChange(Sender: TObject; Field: TField); begin liste.SQL.Clear; liste.SQL.Append('SELECT * FROM ANTEILE WHERE GUNST_INR = '+STRUKTUR1.FieldByName('INR').asstring+' ORDER BY VERTRAG_NR desc '); liste.Open; UniDBGrid1.JSInterface.JSCall('getSelectionModel().selectAll', []); // i also tryed: UniSession.AddJS(UniDBGrid1.JSName + '.getSelectionModel().selectAll();'); end; .. just the focused record has a checked Checkbox Thanx for Help
×
×
  • Create New...