Jump to content

Sherzod

Moderators
  • Posts

    19780
  • Joined

  • Last visited

  • Days Won

    642

Everything posted by Sherzod

  1. Hi JRV. Solution for "left" ... uses ... UniGUIApplication ... UniSession.AddJS('document.getElementById("'+nwbtn.JSName+'_id-btnEl").className = "x-btn-left";'); nwbtn:=TUniButton.Create(MainFormV2); nwbtn.Parent:=MainFormV2; nwbtn.Top:=10; nwbtn.left:=15; nwbtn.Width:=170; nwbtn.Height:=20; nwbtn.Caption:='Press here'; nwbtn.Cursor:=crHandPoint; nwbtn.OnClick:=SelectionClick; UniSession.AddJS('document.getElementById("'+nwbtn.JSName+'_id-btnEl").className = "x-btn-left";'); Sincerely.
  2. Hi Ulugbek. Basically, you're doing it right ... Sorry, even I Do not Know what to say ... Sincerely.
  3. Hi All! In my opinion another good Virtual Keyboard, just need to find out how to include to the project: http://mottie.github.io/Keyboard/ Best regards...
  4. Hi Ulugbek. What code is executed when the application is closing? Can you give the code snippet? Regards...
  5. Hi JRV. .x-btn .x-btn-inner { color: white !important; } .x-btn-over .x-btn-inner { color: black !important; } Best regards...
  6. JavaScript Graphical / Virtual Keyboard Interface. http://www.greywyvern.com/code/javascript/keyboard how to use? Download the following files: 1. http://www.greywyvern.com/code/javascript/keyboard.js 2. http://www.greywyvern.com/code/javascript/keyboard.css 3. http://www.greywyvern.com/code/javascript/keyboard.png 4. UniServerModule CustomFiles Add files/keyboard.js files/keyboard.css 5. Keyboard.png I added to the root directory... 6. Add to form UniEdit1. 7. UniEdit1.ClientEvents.ExtEvents.OnAfterrender function OnAfterrender(cmp) { // focus on field Ext.QuickTips.init(); Ext.defer(function () { cmp.inputEl.dom.focus(); }, 100); // listen virtual keyboard keys cmp.inputEl.on({ mousedown: function (ev) { if (ev.target.tagName === 'TD') { // We trigger change event only on textfield with the focus if (document.activeElement) { if (document.activeElement.id === cmp.inputEl.dom.id) cmp.fireEvent('change'); } } }, delegate: '#keyboardInputMaster' }); cmp.inputEl.dom.style.width = "75%"; VKI_attach(cmp.inputEl.dom); } Sincerely...
  7. Hi uniguicn. Yes, this feature is currently not implemented. But you can implement it this way: uses ... uniGUIApplication ... procedure TMainForm.UniButton1Click(Sender: TObject); var node: TUniTreeNode; begin //node := UniTreeView1.Items.AddChild(SelectedNode, 'TestNode'); node := UniTreeView1.Items.AddChild(nil, 'TestNode'); node.Selected := True; //set(''checked'', false); OR set(''checked'', true); UniSession.AddJS('if (' + UniTreeView1.JSName + '.getSelectionModel().hasSelection()) {'+UniTreeView1.JSName+'.getSelectionModel().getSelection()[0].set(''checked'', false);};'); end; Sincerely ...
  8. Hi Ulugbek. briefly... You've worked with excel sheet? This plugin provides a similar feature! Some of the advantages: 1. Can directly edit the cell without pressing enter. 2. After editing (when you press enter), go directly to the next cell. If you are going to edit directly in the grid, these features make it easy to work! This time, these features are not implemented in UniDBGrid. Best regards!
  9. Hi Ulugbek. try this: UniDBNumberEdit1 > ClientEvents > ExtEvents > OnKeydown function OnKeydown(sender, e) { var event = e; if (event.keyCode == 46 || event.keyCode == 8 || event.keyCode == 9 || event.keyCode == 27 || event.keyCode == 13 || (event.keyCode == 65 && event.ctrlKey === true) || (event.keyCode >= 35 && event.keyCode <= 39)) { return; } else { if (event.shiftKey || (event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105)) { event.preventDefault(); } } } Javascript Char Codes (Key Codes) - http://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes Best regards...
  10. Hi Farshad! When using this plugin, there is one nasty error, and one fatal error: 1. If the cell is active and click mouse to another row or to another column, there is an error row mismatch, if you go on the same row there is no error. 2. When using the locked property column is an error a.selModel is undefined. Can you give a solution or explanation ... If this functionality, the UniDBGrid would include by default, it would be great!!! Thanks in advance.
  11. Hi wxb_km! Unfortunately yes, Excel grid plugin is incompatible in some extent ... I'll try to fix it ... Sincerely ...
  12. Hi Ulugbek. I don't know why, don't works fullexpand; Maybe before calling fullexpand, put a 1 second delay sleep(1000); // or a little more Maybe it's not the best solution, but try ... Best regards...
  13. Hi Ulugbek! I'm sorry, can you describe in detail what is needed such functionality? That is, the dialog is closed after a certain time and the procedure then can be performed... Sincerely...
  14. Hi Ulugbek. Well, for example, you can ... uses ... uniGUIApplication ... procedure ExtShowMessage(ATitle, AMessage: string; AMilliseconds: Cardinal); procedure TMainForm.ExtShowMessage(ATitle, AMessage: string; AMilliseconds: Cardinal); begin UniSession.AddJS('var mb = Ext.MessageBox.show({'+ 'title:'''+ATitle+''','+ 'msg: '''+AMessage+''','+ 'icon: Ext.Msg.QUESTION,'+ 'buttons: Ext.MessageBox.OK,'+ 'closable: false,'+ 'fn:function(btn) {}});'+ 'setTimeout(function(){'+ 'mb.close();}, '+IntToStr(AMilliseconds)+');'); end; Use: procedure TMainForm.UniButton1Click(Sender: TObject); begin ExtShowMessage('Save Changes?', 'You are closing a tab that has unsaved changes. Would you like to save your changes?', 1000); end; Ext.Msg.INFO; Ext.Msg.QUESTION; Ext.Msg.WARNING; Ext.Msg.ERROR; http://www.sencha.com/forum/showthread.php?196717-Automatically-closing-MessageBox-Showing-differnt-boxes-based-on-success-error-store http://dev.sencha.com/playpen/docs/output/Ext.MessageBox.html Sincerely
  15. Hi wxb_km! In the script (excel-grid-plugin.js) find the lines sm.move (e.shiftKey? 'up' : 'down', e); And replace the "up" on the "left", "down" on the "right", ie sm.move (e.shiftKey? 'left' : 'right', e); Best Regards
  16. Hello everybody! A Microsoft Excel grid plugin for Ext JS 4: http://www.lukehorvat.com/blog/excel-grid-plugin-for-ext-js-4/ https://gist.github.com/lukehorvat/5607821/raw/6fe2113b4946b36e8bcdf10a3904560ef9a00758/excel-grid-plugin.js How to use? 1. Download and paste the file in the directory ... \ files 2. UniServerModule> CustomFiles> files/excel-grid-plugin.js 3. UniDBGrid1> UniEvents> OnBeforeInit> function OnBeforeInit (sender) { sender.plugins = [{ptype: 'excelcellediting', clicksToEdit: 2}]; } Best Regards
  17. Hi Erich. Let's say you have a function on the webserver: function test (testname) { alert (testname); } uses ... UniGUIApplication ... 1. UniButton1.JSName + '_id' procedure TMainForm.UniButton1Click(Sender: TObject); begin UniSession.AddJS('test ('+'document.getElementById("'+ UniButton1.JSName +'_id").style.top);'); end; 2. Сan also send values: procedure TMainForm.UniButton1Click(Sender: TObject); var i: Integer; begin i := 7; UniSession.AddJS('test ('+IntToStr(i)+');'); end; Best Regards...
  18. Hi Erich. http://zeoslib.sourceforge.net/viewtopic.php?f=39&t=3786
  19. Hi Ulugbek. How do you build a tree? (you can give the procedure code FILLGOODS) On what field you want to search (Text, ID, ..., better ID)? Maybe after adding a node, and then save to the database, it is not necessary to re-build the tree (do not call the procedure FILLGOODS). By the way, works for me FullExpand. sincerely
  20. Hi Ulugbek. Try ShowMessage(maintab.Tabs[maintab.TabIndex]); sincerely
  21. Hi Erich. Sorry, I think, here again the same error on copy / paste Delete all the spaces inside the quotes! UniSession.AddJS ('ajaxRequest (' + UniButton1.JSName + ','' scrollboxTop'', ['' Top ='' + document.getElementById ("' + hauptscrollbox.JSName + '_id-body"). scrollTop]) ; ') 1. '' scrollboxTop'' = ''scrollboxTop'' 2. '' Top ='' = ''Top='' correct: UniSession.AddJS ('ajaxRequest (' + UniButton1.JSName + ',''scrollboxTop'', [''Top='' + document.getElementById ("' + hauptscrollbox.JSName + '_id-body").scrollTop]) ; ') best regards...
  22. error when copy / paste incorrect: procedure TMainForm.UniButton1Click(Sender: TObject); begin // Here should be only a line of code: UniSession.AddJS ('ajaxRequest (' + UniButton1.JSName + ','' scrollboxTop'', ['' Top ='' + document.getElementById ("' +hauptscrollbox.JSName + '_id-body"). ScrollTop]);' ); end; correct: procedure TMainForm.UniButton1Click(Sender: TObject); begin // Here should be only a line of code: UniSession.AddJS ('ajaxRequest (' + UniButton1.JSName + ','' scrollboxTop'', ['' Top ='' + document.getElementById ("' + hauptscrollbox.JSName + '_id-body").scrollTop]);' ); end; corrected: ScrollTop --- scrollTop
  23. error when copy / paste incorrect: procedure TMainForm.UniButton1Click(Sender: TObject); begin // Here should be only a line of code: UniSession.AddJS ('ajaxRequest (' + UniButton1.JSName + ','' scrollboxTop'', ['' Top ='' + document.getElementById ("' + hauptscrollbox.JSName + '_id-body"). ScrollTop]);' ); end; correct: procedure TMainForm.UniButton1Click(Sender: TObject); begin // Here should be only a line of code: UniSession.AddJS ('ajaxRequest (' + UniButton1.JSName + ','' scrollboxTop'', ['' Top ='' + document.getElementById ("' + hauptscrollbox.JSName + '_id-body").scrollTop]);' ); end; corrected: ScrollTop --- scrollTop
  24. Hi Erich. Try this method: .... uses uniGUIApplication, .... 1. Create a global variable or local... : ( or you can, not use a variable. Further in the post StrToInt(Params.Values['Top']); ) scrTop: Integer; 2. In the event onClick button write code like this: ...my uniScrollbox is named: "hauptscrollbox"... procedure TMainForm.UniButton1Click(Sender: TObject); begin // Here should be only a line of code: UniSession.AddJS ('ajaxRequest (' + UniButton1.JSName + ','' scrollboxTop'', ['' Top ='' + document.getElementById ("' + hauptscrollbox.JSName + '_id-body").scrollTop]);' ); end; 3. In the event onAjaxEvent button write the following code: procedure TMainForm.UniButton1AjaxEvent(Sender: TComponent; EventName: string; Params: TStrings); begin // All logic, onclick button if (EventName = 'scrollboxTop') Then begin scrTop := StrToInt(Params.Values['Top']); ShowMessage(IntToStr(scrTop)); end; end; Sincerely ...
  25. Hi Ulugbek. Can you give a test example?
×
×
  • Create New...