Jump to content
uniGUI Discussion Forums

belo

uniGUI Subscriber
  • Content Count

    158
  • Joined

  • Last visited

  • Days Won

    5

belo last won the day on July 12

belo had the most liked content!

Community Reputation

24 Excellent

1 Follower

About belo

  • Rank
    Active Member

Contact Methods

  • MSN
    belo@elogica.com.br

Profile Information

  • Gender
    Male
  • Location
    Brazil

Recent Profile Visitors

437 profile views
  1. belo

    How to use Toasty.JS ?

    Flavio, I made an example adapted to your needs. Best regards, Eduardo Belo Toasty JS Code Sample
  2. belo

    Toasty JS

    Hi, Attached, an example of how to use Toast JS at the request of Flávio Mota member. Demo Best Regards, Eduardo Belo UniGUI_ToastyJS_20190910.rar
  3. belo

    TUniFrame, OnKeyDown Event

    Hi Flávio! I didn't quite understand your question, but maybe it will help you.. // UniEdit function beforeInit(sender, config) { config.keyMap = { SPACE: { // keyCode = 32 handler: function() { ajaxRequest(sender, '_SPACE', []); } } } } procedure TMainForm.UniEdit1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_SPACE' then begin InsertFrame(TUniFrame(TUniFrame1), 'Frame 1', True); end; end; Best regards, Eduardo Belo
  4. Remove mask at runtime... UniSession.JSCode('$("#' + edtPesquisa.JSName + '_id-inputEl").inputmask("remove");'); Regards, Eduardo Belo
  5. belo

    How to use JQuery Mask with Mobile Edit Component

    https://docs.sencha.com/extjs/6.7.0/classic/Ext.field.InputMask.html
  6. belo

    UniDBEdit does not work with GetText from TField

    The problem is not the UniDBEdit but the UniDBGrid. If you disable the UniDBGrid, the error does not occur. Maybe this behavior is a bug. PT-BR: O problema não é o UniDBEdit e sim o UniDBGrid. Se você desativar o UniDBGrid não acontece o erro. Talvez esse comportamento seja um bug.
  7. belo

    UniDBEdit does not work with GetText from TField

    Hi, The ID field of your XML is 2 in size Maybe this will solve ... procedure TMainForm.FDMemTable1IDGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin if Sender.AsVariant = Null then Exit; Text := FormatFloat('00', StrToFloat(Sender.AsString)); end; procedure TMainForm.FDMemTable1IDSetText(Sender: TField; const Text: string); begin Sender.AsString := FormatFloat('00', StrToFloat(Text)); end; Regards, Eduardo Belo
  8. belo

    How to use JQuery Mask with Mobile Edit Component

    UnimEdit1 > ClientEvents > UniEvents function beforeInit(sender, config) { config.placeholder = '000.000.000-00'; config.inputMask = '999.999.999-99'; } Regards, Eduardo Belo
  9. belo

    change the height of the line in uniTreeMenu

    .x-treelist-nav .x-treelist-item-text { line-height: 30px; } .x-treelist-nav .x-treelist-item-icon:before, .x-treelist-nav .x-treelist-item-tool:before, .x-treelist-nav .x-treelist-item-expander { line-height: 30px; } Regards, Eduardo Belo
  10. Hi! I developed this example based on the jQuery Mask Plugin library created by developer Igor Escobar. Source and usage: https://igorescobar.github.io/jQuery-Mask-Plugin/docs.html UniGUI Demo // UniEdit > ClientsEvents > UniEvents // Example Phone function afterCreate(sender) { var SPMaskBehavior = function(val) { return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009'; }, spOptions = { onKeyPress: function(val, e, field, options) { field.mask(SPMaskBehavior.apply({}, arguments), options); } }; $("#" + sender.id + "-inputEl").mask(SPMaskBehavior, spOptions); } Regards, Eduardo Belo UniGUIOnTheFlyMaskChange.rar
  11. Hi, In the attachment, an example of how to use the OnKeyDown event with the KeyMap object of the Ext.panel.Panel in TUniFrame. function beforeInit(sender, config) { config.keyMap = { a: { handler: function() { Ext.Msg.alert('key pressed', 'you have pressed a'); } }, F2: { handler: function() { ajaxRequest(sender, '_F2', []); } }, ESC: { handler: function() { ajaxRequest(sender, '_ESC', []); } }, DELETE: { handler: function() { ajaxRequest(sender, '_DELETE', []); } } } } Demo Regards, Eduardo Belo UniGUIFramesKeyEvents.rar
  12. function keypress(sender, e, eOpts) { // [\u0300-\u036f]/g this code snippet is a regular expression // that takes the range of accents: ', ~, ^ function removerAcentos(s) { return s.normalize('NFD').replace(/[\u0300-\u036f]/g, "") } var val = sender.getValue() ; sender.setValue(removerAcentos(val)); } best regards Eduardo Belo
  13. belo

    uniDBGrid Column Text

    Try the OnGetText event of the field. Eduardo Belo
  14. belo

    How to have a tip at the point you click?

    maybe this will help.. http://forums.unigui.com/index.php?/topic/6712-overflowing-text-grid-cell-tooltip/&do=findComment&comment=34164 UniDBGrid -> ClientEvents -> ExtEvents viewready fn function viewready(sender, eOpts) { var tm = new Ext.util.TextMetrics(); sender.view.tip = Ext.create('Ext.tip.ToolTip', { target: sender.view.el, delegate: sender.view.cellSelector, trackMouse: true, renderTo: Ext.getBody(), listeners: { beforeshow: function updateTipBody(tip) { gridColums = sender.view.getGridColumns(); column = gridColums[tip.triggerElement.cellIndex]; record = sender.view.getRecord(tip.triggerElement.parentNode); if (column.dataIndex !== '-1' && (column.getWidth() < (tm.getSize(record.data[parseInt(column.dataIndex)]).width) + 5)) { tip.update(record.data[parseInt(column.dataIndex)]); } else { return false; } } } }); }
×