Jump to content

Sherzod

Moderators
  • Posts

    19719
  • Joined

  • Last visited

  • Days Won

    639

Everything posted by Sherzod

  1. Hi mehmet pak. If I understand correctly. You want to freeze the first row? Honestly I could not do it in the stringgrid ... If anyone can, it would be good ... But, in my opinion, you can use two unistringrid on one panel. 1. Unistringgrid1: rowCount = 1, Align = AlTop, you need to find the height of ... (e.g. Height = 24) 2. Unistringgrid2: rowCount = 100, Align = AlClient procedure TMainForm.UniStringGrid1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if UniStringGrid2.Col <> UniStringGrid1.Col then UniStringGrid2.Col := UniStringGrid1.Col; end; procedure TMainForm.UniStringGrid2MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if UniStringGrid1.Col <> UniStringGrid2.Col then UniStringGrid1.Col := UniStringGrid2.Col; end; Sincerely ...
  2. Hi erich. can help: http://forums.unigui.com/index.php?/topic/3205-creation-tunilabel-in-runtime-and-getting-width-property/&do=findComment&comment=14874 Sincerely
  3. HI All! Do you think, this approach is correct? procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject); begin if RemoteAddress <> '111.111.111.111' then begin UniSession.Terminate(RemoteAddress + ' is not allowed...'); end; end; Sincerely ...
  4. Hi Ulugbek. I know there are other solutions, but for now can use the following code: type THackGrid = class(TUniDBGrid); THackGrid(UniDBGrid1).CurrCol := 0; DataSource1.DataSet.Close; DataSource1.DataSet.Open; Sincerely ...
  5. OR UniSession.AddJS(UniDBGrid1.JSName+'.getView().scrollBy(-100, 0, false);');
  6. Hi Ulugbek. Gone was an error while rendering? Just this code returns the position of scroll in its place: UniSession.AddJS('var gridScrollXValue='+UniDBGrid1.JSName+'.getView().el.dom.scrollLeft;'+UniDBGrid1.JSName+'.scrollByDeltaX(-gridScrollXValue);'+UniDBGrid1.JSName+'.scrollByDeltaX(gridScrollXValue);'); DataSet.Close; DataSet.Open; And this code returns to the starting left position: UniSession.AddJS('var gridScrollXValue='+UniDBGrid1.JSName+'.getView().el.dom.scrollLeft;'+UniDBGrid1.JSName+'.scrollByDeltaX(-gridScrollXValue);'); DataSet.Close; DataSet.Open; The problem is that if you select the last column, then the code is not executed correctly, ie in the sense of running, but again, the highlight remains the selected column. Gone was an error while rendering? Sincerely.
  7. Hi Ulugbek. Try this: uses ... UniGUIApplication ... UniDBGrid1.JSName+'.scrollByDeltaX(-gridScrollXValue);' UniSession.AddJS('var gridScrollXValue='+UniDBGrid1.JSName+'.getView().el.dom.scrollLeft;'+UniDBGrid1.JSName+'.scrollByDeltaX(-gridScrollXValue);'+UniDBGrid1.JSName+'.scrollByDeltaX(gridScrollXValue);'); DataSet.Close; DataSet.Open; Sincerely
  8. Hi MarcoRu. Try this: uses ... UniGUIApplication ... procedure TMainForm.UniButton1Click(Sender: TObject); begin UniSession.AddJS('var strList = ""; Ext.each('+UniDBGrid1.JSName+'.columns, function(col, index) {if (!col.hidden){if (strList === ""){strList = col.text}{strList = strList + "," + col.text}}}); ajaxRequest ('+UniButton1.JSName+',''getVisibleList'', [''List=''+strList]);'); end; procedure TMainForm.UniButton1AjaxEvent(Sender: TComponent; EventName: string; Params: TStrings); begin if (EventName = 'getVisibleList') Then begin //Params.Values['List'] - Returns a string separated by commas ... ShowMessage(Params.Values['List']); end; end; Sincerely ...
  9. Hi Mohammad Hamdan. Try this: uses ... Vcl.Grids ... type TMyStringGrid = class (TUniStringGrid) FGrid: TStringGrid; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; end; { TMyStringGrid } constructor TMyStringGrid.Create(AOwner: TComponent); begin inherited; FGrid := TStringGrid.Create(nil); end; destructor TMyStringGrid.Destroy; begin FGrid.Free; inherited; end; Example: procedure TMainForm.UniButton1Click(Sender: TObject); var MyStringGrid: TMyStringGrid; begin MyStringGrid := TMyStringGrid.Create(Self); with MyStringGrid do begin Align := alTop; ColCount := 10; RowCount := 10; Parent := Self; end; MyStringGrid.Cells[1, 1] := 'Test'; MyStringGrid.FGrid.Objects[1, 1] := TObject(5); ShowMessage(IntToStr(Integer(MyStringGrid.FGrid.Objects[1, 1]))); end; Sincerely ...
  10. Thank Hayri Aslan! I think this is good news! You can tell how long to wait for 0.94? Sincerely.
  11. Hi Paulo Monteiro! Only for Web mode... Thank you...
  12. Hi All! How about creating a component on based ExtPascal. I am particularly interested in creating DataBase component! Do you have any achievements, or suggestions??? Sincerely ...
  13. Hi rasaliad. I hope can will help: Delphi tutorial video: Building REST applications that work with data and Google Spreadsheets http://edn.embarcadero.com/article/40451 http://blog.marcocantu.com/blog/rest_delphi_spreadsheet_videos.html Sincerely
  14. Hi rasaliad. https://developers.google.com/accounts/docs/AuthSub?hl=en-en&csw=1 https://developers.google.com/gdata/docs/js-authsub?hl=en-en&csw=1
  15. Hi Paulo Monteiro. If I understand the question, try this: ... uses UniGUIApplication ... Just use the property JSName UniSession.AddJS(MainForm.Grid.JSName+'.getView().focusRow('+IntToStr(Query.RecNo-1)+')'); Or UniSession.AddJS(YourGridName.JSName+'.getView().focusRow('+IntToStr(Query.RecNo-1)+')'); Or UniSession.AddJS(YourFrameName.YourGridName.JSName+'.getView().focusRow('+IntToStr(Query.RecNo-1)+')'); Sincerely.
  16. for overCls UniSession.AddJS(nwbtn.JSName+'.overCls = "btngray-over";');
  17. 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.
  18. Hi Ulugbek. Basically, you're doing it right ... Sorry, even I Do not Know what to say ... Sincerely.
  19. 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...
  20. Hi Ulugbek. What code is executed when the application is closing? Can you give the code snippet? Regards...
  21. Hi JRV. .x-btn .x-btn-inner { color: white !important; } .x-btn-over .x-btn-inner { color: black !important; } Best regards...
  22. 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...
  23. 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 ...
  24. 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!
×
×
  • Create New...