Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/12/19 in all areas

  1. 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
    2 points
  2. 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
    1 point
  3. OK ... found it .. :-) UniDBGrid -> LayoutConfig ->Cls = graygrid and the css is: .graygrid .x-grid-body { background: #434550 ; ....
    1 point
  4. These steps improve situation: 1. UniChart.LayoutConfig.BodyPadding := 0; (from 10) 2. For UniPieSeries.SeriesLabel.Display='inside' i recommend using: config.innerPadding=10; config.insetPadding=-10; 3. For UniPieSeries.SeriesLabel.Display='outer' and 'rotate' i recommend using: config.innerPadding=10; config.insetPadding=30; // or more (depending on labels length) 4. And finally we need a way to reduce calloutLine.length somehow to minimize unused space around diagram. Dirty source hack: function TUniCustomSeriesLabel.AsString(AFieldName: string): string; begin if (AFieldName<>'') and (AFieldName[1]<>'[') then AFieldName := '"' + AFieldName + '"'; Result := '{'+ 'field:'+AFieldName+ IfThen(FEnabled and (FDisplay<>'none'), ',display:"'+ FDisplay +'"'+ IfThen(FCalloutLine.FVisible, ',calloutLine:true','')+ ',calloutLine: { length: 25 }'+ // <----------------------------------------------------------- 20-30. IfThen(not FFont.IsDefault, ',font:"'+FFont.ToString(False, False, False, False)+'"','')+ IfThen(not FFont.Color<>clWindowText, ','+FFont.ToColor(True, False),'')+ IfThen(FOrientation<>tloHorizontal, ',orientation:"vertical"','')+ IfThen(FPadding<>20, ',padding:'+IntToStr(FPadding),''), '')+ '}'; end; Can i set calloutLine at runtime? 5. Missing labels: 6. And finally: Can i add units in hint? These are stored in dataset, but seems like not all DS fields are loaded into Chart, so i cant just use them in JS.
    1 point
×
×
  • Create New...