Jump to content

Sherzod

Moderators
  • Posts

    22084
  • Joined

  • Last visited

  • Days Won

    777

Everything posted by Sherzod

  1. Hello, Important: Do not select Clean All or Clean commands for any of the uniGUI packages. This will delete all pre-compiled DCU files from the DCU folder and you will have to install uniGUI again. https://unigui.com/resources/installation-instructions
  2. Hello, HorzScrollBar and VertScrollBar are currently not supported in TUniFrame — avoid setting them.
  3. You can create a component based on flatpickr. https://flatpickr.js.org/examples/
  4. type TXPopupMenu = class(TUniPopupMenu) end; procedure TMainForm.UniFormReady(Sender: TObject); begin with TXPopupMenu(UniPopupMenu1).MenuControl.JSInterface do begin JSConfig('shadow', [False]); JSConfig('style', ['border-radius:20px']); end; end;
  5. Hello, Solution: procedure TMainmForm.FillCanvas; var Count, LineStep, FontSize, BottomMargin, H: Integer; begin Count := 100; LineStep := 25; FontSize := 16; BottomMargin := 10; H := Count * LineStep + FontSize + BottomMargin; UnimCanvas1.Align := alNone; // important UnimCanvas1.Height := H; UnimCanvas1.Width := UnimScrollBox1.Width - 5; UnimCanvas1.JSInterface.JSCode( 'setTimeout(function(){' + ' var me = '#1'._cc_;' + ' if (me && me.canvas) {' + ' me.canvas.height = ' + IntToStr(H) + ';' + ' me.canvas.style.height = "' + IntToStr(H) + 'px";' + ' me.clearRect(0,0,me.canvas.width,me.canvas.height);' + ' me.fillStyle = "' + uniColor2Web(clMaroon, 1) + '";' + ' me.font = "' + IntToStr(FontSize) + 'px sans-serif";' + ' for (var k=1; k<=' + IntToStr(Count) + '; k++) {' + ' me.fillText("New Line: " + k, 20, ' + IntToStr(LineStep) + '*k);' + ' }' + ' }' + '}, 0);' ); end;
  6. I’ve tested fadeIn/fadeOut, and it doesn’t seem to be the best approach for menus...
  7. Do you mean applying the same behavior to TUniPopupMenu? If so, which exact part are you referring to?
  8. You may also try using OnCompleted instead of OnMultiCompleted.
  9. Hello, Could you please create a small test case that reproduces the issue?
  10. Try this approach: CustomCSS -> .x-disabled img { opacity: 0.5; }
  11. Hello! What image format are you loading (PNG/JPG)? And are you disabling it via Enabled = False? If possible, please upload a sample image.
  12. Hello Andy, It looks like you're embedding HTML formatting directly into the field value. This approach usually leads to issues like the one you're seeing, because the editor uses the raw value. If the coloring is always assigned manually, you might want to consider introducing a simple condition (e.g. a status or flag) and applying the formatting in the column renderer instead.
  13. Hello, Could you please clarify a few details: Which uniGUI version are you using? Are you handling uploads via OnCompleted or OnMultiCompleted event? What is the approximate total size of all uploaded files? Is OptimizeMemoryUsage enabled?
  14. Mevcut çözümde CellClick içinde hem UI, hem veritabanı hem de dosya işlemleri yapılmış. Bu iyi bir yaklaşım değil çünkü CellClick sık tetiklenebilir ve ağır işlemler içeriyor (BLOB → stream → dosya → URL).
  15. Merhaba, Merak ettim, bu metodu hangi kaynaktan aldınız?
  16. Can you try this approach? function afterCreate(sender) { var fieldIndex = "0"; // set your field index here function parseDateValue(v) { if (!v) return v; if (v instanceof Date) return v.getTime(); if (typeof v === "number") return v; if (typeof v === "string") { if (v.length >= 10 && v[2] === '.' && v[5] === '.') { var d = Ext.Date.parse(v, "d.m.Y H:i:s") || Ext.Date.parse(v, "d.m.Y"); if (d) return d.getTime(); } if (v.length >= 10 && v[2] === '-' && v[5] === '-') { var d = Ext.Date.parse(v, "d-m-Y H:i:s") || Ext.Date.parse(v, "d-m-Y"); if (d) return d.getTime(); } if (v.length >= 10 && v[4] === '-' && v[7] === '-') { var d = Ext.Date.parse(v, "Y-m-d H:i:s") || Ext.Date.parse(v, "Y-m-d"); if (d) return d.getTime(); } if (v.indexOf('T') > -1) { var d = new Date(v); if (!isNaN(d)) return d.getTime(); } } return v; } var store = sender.getStore(); if (!store) return; var dir = 'DESC'; store.setGrouper({ direction: dir, groupFn: function(record) { return parseDateValue(record.get(fieldIndex)); } }); store.setSorters([{ direction: dir, sorterFn: function(a, b) { var v1 = parseDateValue(a.get(fieldIndex)); var v2 = parseDateValue(b.get(fieldIndex)); if (v1 > v2) return 1; if (v1 < v2) return -1; return 0; } }]); if (sender.groupingInfo && sender.groupingInfo.header) { sender.groupingInfo.header.config.tpl.html = '{name:this.formatValue}'; sender.groupingInfo.header.config.tpl.formatValue = function(v) { if (!isNaN(v)) { var d = new Date(parseInt(v, 10)); if (!isNaN(d)) return Ext.Date.format(d, 'd-m-Y'); } return v; }; } }
  17. Thanks, I will check.
  18. Hello, Would you be able to create a test case?
  19. Solution: 1. CustomCSS -> .customTr .x-btn-split-right:after, .customTr .x-btn-split-left:after { background-image: none !important; } .customArrow { background-image: none !important; position: relative; } .customArrow:after { content: '\f0d7'; font-family: FontAwesome, "Font Awesome 5 Free"; font-weight: 900; position: absolute; right: 6px; top: 50%; margin-top: -6px; pointer-events: none; } 2. procedure TMainForm.UniFormCreate(Sender: TObject); begin UniMenuButton1.JSInterface.JSConfig('cls', ['customTr']); UniMenuButton1.JSInterface.JSAddListener( 'afterrender', 'function(me){' + ' if (!me || me._customStyled) return;' + ' me._customStyled = true;' + ' if (me.arrowEl){' + ' me.arrowEl.addCls("customArrow");' + ' if (me.btnInnerEl){' + ' var color = me.btnInnerEl.getStyle("color");' + ' if (color){' + ' me.arrowEl.setStyle("color", color);' + ' }' + ' }' + ' }' + '}' ); end;
  20. Hello, Np, try this approach: UniDBGrid1.ClientEvents.ExtEvents -> function reconfigure(sender, store, columns) { if (!sender._cMask) { sender._cMask = new Ext.LoadMask({ target: sender, msg: 'Filtering...' }); var store = sender.getStore(); store.on('load', function () { sender._cMask.hide(); }); store.on('exception', function () { sender._cMask.hide(); }); } columns.forEach(function (col) { if (col.fedit && !col._maskBound) { col._maskBound = true; col.fedit.on('change', function () { sender._cMask.show(); // safety fallback Ext.defer(function () { if (sender._cMask) { sender._cMask.hide(); } }, 8000); }); } }); }
  21. Could you please create the test case again without unnecessary dependencies?
  22. Hello, You have some dependencies, and it seems there are third-party components involved, so I couldn’t run your test case. However, the general idea is clear — when filters are applied, the grid should show a mask during that time, if I understood correctly, right?
×
×
  • Create New...