Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/30/19 in all areas

  1. I created a simple unit for google oauth2. To get QR Code, call UniImage1.Url:=GetQRCodeUrl(UniImage1.Width, UniImage1.Height, 'YOURSECRETKEY', 'your email address', 'Your name'); To ValidateOTP : if Format('%.6d', [CalculateOTP('YOURSECRETKEY')]) = UniEdit1.Text then begin // Valid end; Here some screenshots GoogleAuth.pas
    1 point
  2. Hi, Can you try this? UnimFormReady: procedure TMainmForm.UnimFormReady(Sender: TObject); begin with UnimSegmentedButton1 do begin JSInterface.JSCall('setBadgeText', [10], Items[0].JSMenuItem); JSInterface.JSCode('var me='#1'.badgeElement; me.setY(parseInt(me.getY()+4)); me.setStyle("left", null);', Items[0].JSMenuItem); end; end; SetBadgeText, for example: with UnimSegmentedButton1 do JSInterface.JSCall('setBadgeText', ['2019'], Items[0].JSMenuItem);
    1 point
  3. Yes - i can .. but i hope (all users who use this...) are also sharing additional ideas, better coding and other functions ;-) .... i suggest this Tread for updates and uploads... Full Version: mo2020.zip Additional Informations: in this version - where is a " new BroadcastChannel" - idea embeeded .. (i am very proud!) I use this technic to communicate between Android-App and UNIGUI .... A Simple Android App (with just a TWebbrowser to show my UniGui-dll) sends - if the user clicks on AndroidHardwareBack - a information via BroadcastChannel to the UniGui-BrowserApp ... the Browser App converst the BroadcastChannel-Information into a Ajax-Event .. and the UniGui reacts on the Ajax-Event Demonstation: The Android App calls my UniGui-dll ... shows it in a TWebBrowser ... and if user clicks on "AndroidHardwareBack" - the uniGui reacts ... (the last click in the video at 0:10 is the "AndroidHardwareBack"-click..) 2019_05_29_13_34_40.mp4
    1 point
  4. Hi, In many grids, I use cell hints to display different information than the one that appears inside the cell. For example, one cell contains information about a license number, the hint would display the client name that is associated with this license number. I have a function in MainForm that returns the client firstName and lastName for that particular license: function TMainForm.GetClientName(const Licence: integer): string; var S: string; begin with ClientTB do begin if FindKey([Licence]) then Result := S + Trim(Fields[2].AsString) + ' ' + Trim(Fields[1].AsString); else Result := ''; end; end; What I am trying to achieve is this: I am using this code from here: UniDbGrid.ClientEvents.ExtEvents Finally my question is: How can I access MainForm.GetClientName with record.data[3] as parameter so that I can display the information about the client in the tooltip? Thank you, Denis Prince D10.1 UniGUI 1.70.0.1493
    1 point
  5. Hi Sherzod, I know you are very busy but have you had a chance to check it again and see if it is possible to use the toolTip to show information from the lookup table? Thank you again for your help, Denis Prince
    1 point
  6. Ok, I will check it again
    1 point
  7. no, I haven't. I'm looking for some light to do it. Some idea will be wellcome.
    1 point
  8. Mainmodule has no css feature. i add server module CustomCSS. .list .x-list-item { display: inline-block; width: 50%; } But there was no change.
    1 point
  9. How do I change the color of the conditionally post?
    1 point
  10. Thanks for the explanation Hayri. I'm going to try to implement you're code.
    1 point
  11. CopytoClipboard will not work in browser like vcl application. Using this function directly copy text to clipboard of server, not client document.execCommand('copy') must be triggered by the user. It's not only from the console, it's anywhere that's not inside an event triggered by the user. Due to this reason btnCopyToClipboard.ClientEvents.ExtEvents.Values['click'] must be defined in UniFormCreate. Solution : btnCopyToClipboard.ClientEvents.ExtEvents.Values['click']:='function click(sender, e, eOpts) '+ ' { '+ ' var textarea = document.getElementById("'+memSummary.JSName+'_id-inputEl"); '+ ' textarea.select(); '+ ' try { '+ ' var successful = document.execCommand(''copy''); '+ ' if(successful) console.log(''Copied!''); '+ ' else console.log(''Unable to copy!''); '+ ' } catch (err) { '+ ' console.log(''Unsupported Browser!''); '+ ' } '+ ' }'; Select All : UniSession.AddJS(' var textarea = document.getElementById("'+memSummary.JSName+'_id-inputEl"); '+ ' textarea.select(); ');
    1 point
  12. The question is how you want to store several selected values in a single Field? Lets say you show LookupComboBox for an int field with values in 1..10 range, and user selects 1,2 and 5. How are you going to store them?
    1 point
×
×
  • Create New...