Jump to content
uniGUI Discussion Forums


uniGUI Subscriber
  • Content Count

  • Joined

  • Last visited

  • Days Won


belo last won the day on October 19

belo had the most liked content!

Community Reputation

27 Excellent

1 Follower

About belo

  • Rank
    Active Member

Contact Methods

  • MSN

Profile Information

  • Gender
  • Location

Recent Profile Visitors

527 profile views
  1. belo

    how to get the selected value from a dbgrid combo box

    Maybe this can help you.. procedure TMainForm.UniDBGrid1SetCellValue(Sender: TObject; ACol, ARow: Integer; AField: TField; var Value: Variant); begin if AField = FDMemTable1.FieldByName('combo1') then ShowMessage(Value); end; // The correct would be this code work procedure TMainForm.UniComboBox1Select(Sender: TObject); begin ShowMessage(TUniComboBox(Sender).Items[TUniComboBox(Sender).ItemIndex]) end; sds Eduardo Belo
  2. belo

    how to get the selected value from a dbgrid combo box

    Do you want to return the text on the field?
  3. Farshad, you have my full support and trust. Congratulations for your work. Long coming to UniGUI. Best regard, Eduardo Belo
  4. belo

    How to use Toasty.JS ?

    Flavio, I made an example adapted to your needs. Best regards, Eduardo Belo Toasty JS Code Sample
  5. 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
  6. 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
  7. Remove mask at runtime... UniSession.JSCode('$("#' + edtPesquisa.JSName + '_id-inputEl").inputmask("remove");'); Regards, Eduardo Belo
  8. belo

    How to use JQuery Mask with Mobile Edit Component

  9. 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.
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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