Jump to content
uniGUI Discussion Forums


uniGUI Subscriber
  • Content Count

  • Joined

  • Last visited

  • Days Won


belo last won the day on December 26 2019

belo had the most liked content!

Community Reputation

33 Excellent

1 Follower

About belo

  • Rank
    Active Member

Contact Methods

  • MSN

Profile Information

  • Gender
  • Location

Recent Profile Visitors

682 profile views
  1. Hi! // Use the OnGetText event of your numeric field procedure TUniMainModule.PEDIDOSPRO_PRECOGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin Text := FormatCurr('Preço: R$ ##,###,##0.00', Sender.AsFloat); end; Best Regards, Eduardo Belo
  2. belo

    how to put phone mask on an unimedit?

    function beforeInit(sender, config) { config.inputMask = '(99) 9999-9999'; } Eduardo Belo
  3. belo

    Phone mask input with 9 digit

    See this example: http://forums.unigui.com/index.php?/topic/12736-on-the-fly-mask-change/&tab=comments#comment-67805 Best Regards, Eduardo Belo
  4. belo

    TUnimEdit - disable dropdown

    function beforeInit(sender, config) { config.autoComplete = false; } Best Regards, Eduardo Belo
  5. Hi, An alternative is to use the field's OnGetText event using CSS classes, for example: procedure TMainForm.FDMemTable1IMAGEGetText(Sender: TField; var Text: string; DisplayText: Boolean); begin if DisplayText then Text:= Sender.AsString + '<h4>' + FDMemTable1ID.Text + '</h4>'; end; procedure TMainForm.UniFormCreate(Sender: TObject); begin FDMemTable1.Open; // Use Font Awesome FDMemTable1.AppendRecord([1, '<i class="fas fa-frown-o fa-4x" style=color:red></i>']); FDMemTable1.AppendRecord([2, '<i class="fas fa-meh fa-4x" style=color:orange></i>']); FDMemTable1.AppendRecord([3, '<i class="fas fa-smile fa-4x" style=color:green></i>']); end; This example used font awesome, but you can use images, etc. Best Regards, Eduardo Belo UniGUIDBGridImageCSS.rar
  6. belo

    how to simulate enter key = #13 in checkbox

    // Developed by Eduardo Belo // UniCheckBox > ClientEvents > UniEvents function beforeInit(sender, config) { config.keyMap = { ENTER: { handler: function() { if (sender.checked) { sender.setValue(false); } else { sender.setValue(true); } } } } } Best Regards, Eduardo Belo
  7. See in Demo has the example Grid - ActionColumn. Best Regards, Eduardo Belo
  8. belo

    Change CSS in RunTime

    /* CustomCSS */ .tree_menu .x-treelist-nav { background-color: red; } // RunTime procedure TMainForm.btnAddClick(Sender: TObject); begin UniSession.AddJS('$(''#'+TUniControl(UniTreeMenu1).JSId+''').addClass(''tree_menu'')'); end; procedure TMainForm.btnRemoveClick(Sender: TObject); begin UniSession.AddJS('$(''#'+UniTreeMenu1.JSId+''').removeClass(''tree_menu'')'); end; Best Regards Eduardo Belo
  9. belo

    UniDBGRID Column Width

    Disable UniDBGrid ForceFit and set the size of fields at run time for your Query, example: In OnCreate or OnShow.. Query.FieldByName('DESCRICAO').DisplayWidth := 10; Best Regards, Eduardo Belo
  10. 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
  11. belo

    how to get the selected value from a dbgrid combo box

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

    How to use Toasty.JS ?

    Flavio, I made an example adapted to your needs. Best regards, Eduardo Belo Toasty JS Code Sample
  14. 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
  15. 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