Jump to content

ttamturk

uniGUI Subscriber
  • Posts

    234
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by ttamturk

  1. Why this question still not answered dunno, but i need to build and install uniGUI with external ddetours library and i can't do that without source codes. Is there anyway to do it? Ps: Also, adding third party libraries into compiled package's is never be a good idea. some of us and some components may be using same library for their selves. It should included with setup but can be used by outsourced.
  2. Hi, I can enable/disable ScreenMask for TUniPopupMenu, but i don't want to disable/enable for all menu items. Some menu items are check/radio items's and they don't have any onclick events. I can't find any way to do it and it seems there isn't any pas file for UniPopupMenu either. Is there any way to workaround this problem with this build? Also it will be very good idea to add ScreenMask property for UniMenuItem, not popup itself. Best regards.
  3. Hi, Before upgrading to last build (it was extjs 4 before) i used to add a listener to uniMenuButton's click event to trigger ArrowClick event and make whole button working as arrow. It's not working anymore. Can anybody help me how can i do this with new build. This is not working: JSAddListener('click', JSFunction('sender, e, eOpts', ' sender.fireEvent("arrowclick", sender, e, eOpts); ') ); Best Regards Project1.rar
  4. Hmm, DBGrid in her kolonu ayrı cell olarak yaratıldığı için mümkün değil. Bunu sadece örnek olarak koydum, belki ileride daha kapsamlı bir testeği unigui bize sağlayabilir. Ben kendi projelerimde seninle aynı şekilde bir yapıya ihtiyaç duyduğumdan kendimce bir yöntem geliştirdim. Grid üzerinde tek bir kolon bırakıyorum mesela ID kolonu. GetCellData event i içerisnde oluşturduğum json a bütün dataset sahalarını tanımlıyorum ve bu kolon un template inde kullanıyorum. Kendi kullandığım event kodunu göstereyim. function GetCellData(const ColNo: Integer; var HasAttr: Boolean): TUniCellRecord; var template : TaidCrossTemplate; mustache: TSynMustache; function ParseStrToHtml(AHtml : RawUTF8) : RawUTF8; begin Result := StringReplace(AHtml, '"', '\"', [rfReplaceAll]); Result := StringReplace(StringReplace(Result, #10, ' ', [rfReplaceAll]), #13, ' ', [rfReplaceAll]); end; function RecordToJSON(ADataSet : TDataSet) : RawUTF8; var I : Integer; begin Result := ''; if ADataSet.Active then begin Result := '{ '; for I := 0 to ADataSet.Fields.Count - 1 do begin Result := Result + '"' + ADataSet.FieldDefs[I].Name + '": "' + StringReplace(ADataSet.Fields[I].AsString, '"', '\"', [rfReplaceAll]) + '", ' end; Result := LeftStr(Result, Length(Result) - 2) + ' '; Result := Result + ' }'; end; end; begin Result := inherited GetCellData(ColNo, HasAttr); if FContextNo = 0 then begin FContextNo := DataSet.RecNo; FContext := RecordToJSON(DataSet); end; if FContextNo <> DataSet.RecNo then begin FContext := RecordToJSON(DataSet); end; template := TemplateByName(Columns[ColNo].FieldName); if template <> nil then begin mustache := TSynMustache.Parse(ParseStrToHtml(template.HTML.Text)); Result.Value := '"' + mustache.RenderJSON(FContext) + '"'; end; if FContextNo = DataSet.RecordCount then FContextNo := 0; end; Burada RecordToJSON ile oluşan yapı ile template içerisinde bütün dataset i Field isimleri ile kullanabilirsin. <b>{{Id}}</b><br /><span>{{TextFieldName}}, {{TimeFieldName}}</span> gibi. Umarım yardımcı olur.
  5. Hi everyone, With new uniGUI, GetCellData event became virtual and i just made a sample how to use it with a MVC like template system. You can learn (and download) about mustache and figure a way how to use it. This is just a basic sample. You must download mustache Delphi library from https://mustache.github.io/ I made a custom DBGrid, and names as TenDBGrid for this sample, enjoy. Best regards. TemplateSample.rar
  6. Hi, There is a function in TUniCustomDBGrid and it's triggerd for every cell on grid while creating content. I need to override it but it's not virtual. Can we get an event for this? or at least can it be a virtual so we can override and customize cell data what ever we like. Best regards
  7. Thanks but i know that method and it's not what i want. Because, i don't have any TField with my Query and it's all generated, also i am trying to use it with my custom made grid which has it's own source for data and one column and it's all custom build html text. I am looking for something grid related, not dataset related.
  8. Hi Everyone, Before jumping into TuniCustomDBGrid, i like to know if there is an easy way to change Row Content while listing with TUniDBGrid without changing data itself. It's created as html and i like to replace some text with values from an array. I need an event like RowCreated and need a parameter to get/set it's innerhtml. Best regards
  9. Hello, Deploying updates to unigui applications for several customers will be painfull with each unigui update. So, i am looking for an easy way to upgrade runtime libraries without using setup. First think came in my mind, maybe runtime package setup exe can support silent upgrade option from command prompt? I am open for any suggestions
  10. Exe bir windows uygulaması, dll ise IIS içerisinde çalışan bir servis. Web tabanlı hizmetlerin, win uygulaması gibi donanım erişim hakları yoktur, activex ile yapılabiliyor ama emin ol bulaşmak istemezsin. web sayfalarında yazıcı erişim çıktısı işlemi kullanılan tarayıcının desteği ile yapılıyor, direk yazdırma yapamazsın ama tarayıcının yazdır fonksyionunu jscript ile çağırabilirsin.
  11. you can't use beforeEdit event, i am not sure why but grid cancel editing automatically. And i can create a checkbox on runtime, it says "checkbox is not a constructor" etc. still working on it. if anyone can find a better solution for this please let us know, this is very critical issue for most developers i think.
  12. Hi, Maybe this will help you to do; procedure BaseGridAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var colIndex : Integer; begin inherited; if EventName = 'select' then begin colIndex := BaseGrid.ColumnByName('FieldValue').Index; case TFieldType of ftDateTime : begin UniSession.AddJS(BaseGrid.JSName + '.columnManager.columns[' + IntToStr(colIndex) + '].setEditor(' + ' new Ext.form.field.Date({' + ' id: ''' + BaseGrid.JSName + 'columnsEditor' + IntToStr(colIndex) + ''', ' + ' xtype: ''datefield'',' + ' format: ''d.m.Y'',' + ' anchor: ''100%'',' + ' })' + ' );'); end; ftInteger : begin UniSession.AddJS(BaseGrid.JSName + '.columnManager.columns[' + IntToStr(colIndex) + '].setEditor(' + ' new Ext.form.field.Number({' + ' id: ''' + BaseGrid.JSName + 'columnsEditor' + IntToStr(colIndex) + ''', ' + ' xtype: ''numberfield'',' + ' anchor: ''100%'',' + ' })' + ' );'); end; else begin UniSession.AddJS(BaseGrid.JSName + '.columnManager.columns[' + IntToStr(colIndex) + '].setEditor(' + ' new Ext.form.field.Text({' + ' id: ''' + BaseGrid.JSName + 'columnsEditor' + IntToStr(colIndex) + ''', ' + ' xtype: ''textfield'',' + ' anchor: ''100%'',' + ' })' + ' );'); end; end; end; end;
  13. Ok, never find. I found it from uniDateTimePicker class. I just looked to wrong class which is DBdatetime... Thanks anyway.
  14. Hi, ı usually use "JSAddListener" to add ext events and "JSConfig" for object properties but TuniDateTimePicker has 2 objects. How should i use these functions to customize this object? Best regards
  15. That's not an effective way, that means i have to check that table with a timer or something which is not a right for a lot of notifications. There is no other way? Thanks
  16. Hi, I need to push a notification to a user from another user, so is there any way to do it? Best regards
  17. Different Border, Background, Font etc. for ReadOnly will be really helpfull.
  18. We need to be able to change htmlmemo's toolbar's background color.
  19. TuniHTMLFrame'in HTML özelliğini kullarak istediğin html metni ekleyebilirsin.
  20. if you are using FR5.1.8 and above you should chech this thread too http://forums.unigui.com/index.php?/topic/4721-some-wierd-behavior-need-help/page-2
  21. That's a feature i requested. It's really mandatory to do incremental seach with a DbLookupCombobox. It's not possible for now.
  22. Design-time! if i assign images at run-time there is no problem.
×
×
  • Create New...