Jump to content

Sherzod

Moderators
  • Posts

    19725
  • Joined

  • Last visited

  • Days Won

    639

Everything posted by Sherzod

  1. Hi msegura. You can use the MainForm -> OnAjaxEvent Best regards
  2. Hi Erich. Try: UniSession.AddJS(UniURLFrame1.JSName+'.body.el.setStyle({background: "#ffffff"});'); Best regards.
  3. Hi YangNing. How to use? 1. Download files: http://www.eekboom.de/js/ClearButton.js (copy to directory .. \ files \) http://www.eekboom.de/css/ClearButton.css (copy to directory .. \ files \) http://www.eekboom.de/images/clear-text-icon.gif (copy to directory .. \ images \, if this directory is not present, create a directory) 2. UniDateTimePicker1 -> ClientEvents -> UniEvents add function beforeInit: function beforeInit(sender) { sender.plugins = new Ext.ux.form.field.ClearButton({animateClearButton: true}); } or function beforeInit(sender) { sender.plugins = ['clearbutton']; } This plugin can also be used for some other text controls, for example: ... The plugin understands these config options: hideClearButtonWhenEmpty (Boolean) - Hide the clear button when the field is empty (default: true). hideClearButtonWhenMouseOut (Boolean) - Hide the clear button until the mouse is over the field (default: true). animateClearButton (Boolean) - When the clear buttons is hidden/shown, this will animate the button to its new state (using opacity) (default: true). clearOnEscape - Empty the text field when ESC is pressed while the text field is focused (default: true). ... Best regards...
  4. Hi YangNing. Try to consider this link: http://www.eekboom.de/ClearButton.html Sincerely
  5. Sherzod

    dbgrid

    Try to analyze an example: C:\Program Files\FMSoft\Framework\uniGUI\Demos\Memo and Image in DBGridonline example: http://prime.fmsoft.net/demo/memoimage.dll
  6. Sherzod

    dbgrid

    Hi Dmytro Lendel. You can clarify the issue? If I understand correctly, you want to merge two fields. I think it can be done in the request (you can use stored procedures), and using the function reconfigure (sender, store, columns, oldStore, the, eOpts) in the grid. I'm sorry if I misunderstood ... Sincerely.
  7. Hi All! There is a solution for the Progress Bar Pager. How to use? 1. You need to include the file "ProgressBarPager.js". One way to, copy the file "ProgressBarPager.js" from the directory "C:\Program Files\FMSoft\Framework\uniGUI\ ext-4.2.1.883\examples\ux" to the directory "... /Files/" add CustomFiles in UniServerModule: files/ProgressBarPager.js 2. Add beforerender function in UniDBGrid: function beforerender(sender, eOpts) { if (sender.pagingBar) { sender.pagingBar.hide(); sender.pagingBar.border = "0 none"; sender.pagingBar.destroy(); sender.addDocked( {dock: 'bottom', items: [Ext.create('Ext.PagingToolbar', { pageSize: sender.store.pageSize, store: sender.store, displayInfo: true, plugins: Ext.create('Ext.ux.ProgressBarPager', {width: 300}) })] }); } } http://docs.sencha.com/extjs/4.1.3/extjs-build/examples/grid/progress-bar-pager.html Sincerely.
  8. HI Ronny Encarnacion. Try: procedure TMainForm.UniFormCreate(Sender: TObject); begin UniSession.AddJS(UniDBNavigator1.JSName + '.items.items[0].setTooltip("First")'); UniSession.AddJS(UniDBNavigator1.JSName + '.items.items[1].setTooltip("Prev")'); end; Best regards
  9. This code cancels pressing Enter, but it is not the best way ...: UniDBGrid1 -> ClientEvents -> ExtEvents -> add and replace function keydown: function keydown(e) { if (e.keyCode == 13 && this.editingPlugin) { this.editingPlugin.completeEdit(); } }
  10. Hi Taha Try: This code not cancels pressing Enter Simply adds the F2 key to enter the cell procedure TMainForm.UniDBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); var gridJSName: string; begin if Key = VK_F2 then begin gridJSName := (Sender as TUniDBGrid).JSName; UniSession.AddJS(gridJSName + '.editingPlugin.startEditByPosition({row: ' + gridJSName + '.uniRow, column: ' + gridJSName + '.uniCol})'); end; end; Best regards.
  11. or on UniPanel: function afterrender(sender, eOpts){ var so = new SWFObject('files/player.swf','mpl','400','250','8'); so.addParam('allowfullscreen','true'); so.addParam('flashvars','file=flowplayer.flv'); so.write(this.id); }
  12. Hi Emiliano you have to change the property Picture in UniMainModule (UniMainModule -> Background -> Picture) Best regards
  13. Hi alf. Try it, I tested on jwplayer (version JW FLV Media Player 5.7), I downloaded from here: http://webi.ru/base/files/tovar/jw_flv_media_player_5_7.zip Embedding the JW Player on your website: 1. Download http://webi.ru/base/files/tovar/jw_flv_media_player_5_7.zip and copy the files (swfobject.js, player.swf) in the directory "files" 2. add CustomFiles: files/swfobject.js files/player.swf in UniServerModule 3. Add a video file to the directory "files", for exampe files/flowplayer.flv 4. Add UniHTMLFrame1 to Form 5. UniHTMLFrame1 - > add HTML: <div id="player"></div> 6. UniHTMLFrame1 - > add AfterScript: var so = new SWFObject('files/player.swf','mpl','400','250','8'); so.addParam('allowfullscreen','true'); so.addParam('flashvars','file=flowplayer.flv'); so.write('player'); 7. AddMimeType in UniServerModule: procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin MimeTable.AddMimeType('flv', 'FLV'); end; it's just a simple example, if you will read the documentation, there are many possibilities... good luck!
  14. I agree with you, but I don't see another approach. Of course, you can still use a dynamic array on the server side. But as said Farshad, it can require a lot of memory resources ... Although, in the future may Farshad will add this feature as selectively (optional) Best regards
  15. Hi Nefasto Cipa. Of course, maybe it's not the best solution, but try, the result is returns the HEX value: 1. type MyHackDBGrid = class(TUniDBGrid) end; .... public { Public declarations } .... cellStartID: Integer; cellBG: string; end; 2. UniDBGrid1 -> ClientEvents -> ExtEvents add function store.load (Ext.data.Store [store]) function store.load(sender, records, successful, eOpts){ ajaxRequest(this, "_load", ["cellStartID=" + Ext.get(sender.grid.id).down("td").id.substr(7,15)]); } 3. procedure TMainForm.UniDBGrid1AjaxEvent(Sender: TComponent; EventName: string; Params: TStrings); begin if EventName = '_load' then begin cellStartID := StrToInt(Params.Values['cellStartID']); end else if EventName = '_getBG' then begin cellBG := Params.Values['_getBG']; //Your custom logic ShowMessage(cellBG); end; end; How to use? for example: procedure TMainForm.UniButton1Click(Sender: TObject); var colIndx, rowIndx: Integer; cellID: Integer; gridJSName: string; lastColIndx, lastRowIndx: Integer; begin gridJSName := UniDBGrid1.JSName; lastColIndx := MyHackDBGrid(UniDBGrid1).CurrCol; lastRowIndx := MyHackDBGrid(UniDBGrid1).CurrRow; colIndx := 0; //StrToInt(UniEdit4.Text); rowIndx := 0; //StrToInt(UniEdit5.Text); if rowIndx > 0 then cellID := cellStartID + (rowIndx * UniDBGrid1.Columns.Count) + colIndx else cellID := cellStartID + colIndx; UniSession.AddJS(gridJSName + '.getSelectionModel().deselect(); ajaxRequest('+gridJSName+', "_getBG", ["_getBG=" + Ext.draw.Color.toHex(Ext.get("ext-gen'+ IntToStr(cellID) +'").getStyle("background-color"))]);'); MyHackDBGrid(UniDBGrid1).CurrRow := lastRowIndx; MyHackDBGrid(UniDBGrid1).CurrCol := lastColIndx; end; Sincerely.
  16. Hi Nefasto Cipa. You have found a solution?
  17. Hi Emiliano. Maybe these links will help: http://stackoverflow.com/questions/9085614/gantt-chart-in-javascript-jquery-extjs http://jsgantt.com/ best regards
  18. While it is possible to use this approach (quick and dirty workaround)... UniDBGrid1 -> ClientEvents -> ExtEvents add beforerender: function beforerender(sender, eOpts) { if (sender.pagingBar) { sender.pagingBar.hide(); sender.addDocked( {dock: 'bottom', items: [new Ext.PagingToolbar( {pageSize: sender.store.pageSize, store: sender.store, displayInfo: true, emptyMsg: "No records to display" }) ] }); } }
  19. Hi Farshad! Is it possible add this property? sender.pagingBar.displayInfo = true; //does not help. Thank you
  20. Hi. Try: tested for TUniLineSeries procedure TMainForm.UniButton1Click(Sender: TObject); var //Series: legendIndx: Byte; legendNewTitle: string; chartJSName: string; begin //Series: legendIndx := 0; legendNewTitle := 'New Title'; chartJSName := UniChart1.JSName; UniSession.AddJS('if ('+ chartJSName +'.items.items[0].legend.items['+ IntToStr(legendIndx) +']) {'+ chartJSName +'.items.items[0].legend.items['+ IntToStr(legendIndx) +'].series.setTitle("'+ legendNewTitle +'")};'); end; Best regards
  21. may be problem in the name MainForm
  22. Hi Alberto vesx. You can add to grid reconfigure: function reconfigure(sender, store, columns, oldStore, the, eOpts){ var tip = Ext.create('Ext.tip.ToolTip', { //for all columns //target: sender.headerCt.id, //for columns[1] target: Ext.get(columns[1].titleEl).id, html: '<b>T</b>est' }); }
  23. 1. procedure pAjaxEvent(Sender: TComponent; EventName: string; Params: TStrings); 2. procedure TMainForm.pAjaxEvent(Sender: TComponent; EventName: string; Params: TStrings); begin if EventName = '_after_move' then begin //ShowMessage(Params.Values['xpos']); (Sender as TUniPanel).Left := StrToInt(Params.Values['xpos']); (Sender as TUniPanel).Top := StrToInt(Params.Values['ypos']); ShowMessage(IntToStr((Sender as TUniPanel).Left) + ' ' + IntToStr((Sender as TUniPanel).Top)); end; end; 3. aktuell_button:=TuniPanel.Create(self); aktuell_button.Cursor:=crHandPoint; aktuell_button.Top:=10; aktuell_button.Left:=10; aktuell_button.Width:=10; aktuell_button.Height:=10; aktuell_button.BorderStyle:=ubsnone; aktuell_button.ShowCaption:=false; aktuell_button.Color:=$00EBEBEB; aktuell_button.Parent:=mainpanel; //aktuell_button.OnClick:=click_objekt; //aktuell_button.OnMouseDown:=down_objekt; aktuell_button.OnAjaxEvent := pAjaxEvent; UniSession.AddJS('Ext.get("' + aktuell_button.JSName + '_id").dd = new Ext.dd.DDProxy(''' + aktuell_button.JSName + '_id'', '''');'); UniSession.AddJS('Ext.apply(Ext.get("' + aktuell_button.JSName + '_id").dd, {afterDrag:function() {ajaxRequest(' + aktuell_button.JSName + ', ''_after_move'', [''xpos='' + (Ext.get("' + aktuell_button.JSName + '_id").getX() - MainForm.form.getX()), ''ypos='' + (Ext.get("' + aktuell_button.JSName + '_id").getY() - MainForm.form.getY())])}});');
  24. Hi erich.wanker. i want to move different Tunipanels with mouse... If I understand correctly, try use Ext.dd.DDProxy: UniSession.AddJS('Ext.get("' + aktuell_button.JSName + '_id").dd = new Ext.dd.DDProxy(''' + aktuell_button.JSName + '_id'', '''');'); aktuell_button:=TuniPanel.Create(self); aktuell_button.Cursor:=crHandPoint; aktuell_button.Top:=10; aktuell_button.Left:=10; aktuell_button.Width:=10; aktuell_button.Height:=10; aktuell_button.BorderStyle:=ubsnone; aktuell_button.ShowCaption:=false; aktuell_button.Color:=$00EBEBEB; aktuell_button.Parent:=mainpanel; //aktuell_button.OnClick:=click_objekt; //aktuell_button.OnMouseDown:=down_objekt; UniSession.AddJS('Ext.get("' + aktuell_button.JSName + '_id").dd = new Ext.dd.DDProxy(''' + aktuell_button.JSName + '_id'', '''');'); Sincerely
×
×
  • Create New...