Jump to content

andyhill

uniGUI Subscriber
  • Posts

    1257
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by andyhill

  1. Looking at your code I am missing MemDS, VirtualTable ?
  2. Thanks Sherzod, all good except tooltip is not working, any ideas ? ' { ' + ' xtype: "numberfield", ' + ' width: 40, ' + ' tooltip: "Count", ' + ' value: '+IntToStr(Count)+', ' + ' listeners: ' + ' { ' + ' change: function(el, v) ' + ' { ' + ' ajaxRequest(MainForm.gAddresses, "_grdCount_", ["val=" + v]) ' + ' } ' + ' } ' + ' }, ' +
  3. I understand but ALL of my apps use the style of code above, I use "tbseparator", "button", "datefield" - can I not use "edit" and "spinedit" etc. ? Can you show me an editor version and a possible spinedit version ?
  4. Did you initialise the variable procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject); begin uPlat:= UniSession.UniPlatform;
  5. UniGUI source code:- TUniPlatform = (upDesktop, upMobile, upPhone, upTablet, upAndroid, upiPhone, upiPad, upiPod, upiOS); I develop mostly in standalone server mode and debugging a MainModule Create UniPlatform variable has never failed me ? I guess I leave this with Sherzod or Farshand or Others - sorry it did not work for you - I would be interested to know why.
  6. This is how I add a datefield to a TUniDBGrid pagingbar, please show me how to add a spinedit field - thanks in advance. ' { ' + ' xtype: "datefield", ' + ' fieldLabel: "", ' + ' formatText: "From Date", ' + ' labelWidth: "0px", ' + ' format: "d/m/Y", ' + ' value: new Date(), ' + ' id: "_grdFromDate_", ' + ' width: 120, ' + ' startDay: 1, ' + ' listeners: ' + ' { ' + ' change: function(el, v) ' + ' { ' + ' ajaxRequest(MainForm.MyGrid, "_grdFromDate_", ["dtIndx=0", "val=" + Ext.Date.format(v, "d/m/Y")]) ' + ' } ' + ' } ' + ' }, ' +
  7. The very first thing that is created by a UniGUI connection is the MainModule Session, surely the uPlat variable is seeded on MainModule.Create ?
  8. This is my code in MainModule ... function DetectPlatform():string; function DetectDeviceType():string; function DetectOperationSystem():string; function DetectModel():string; public { Public declarations } uPlat: TUniPlatforms; // uniGUITypes ... procedure TUniMainModule.UniGUIMainModuleCreate(Sender: TObject); uPlat:= UniSession.UniPlatform; ... function TUniMainModule.DetectDeviceType: string; begin if (upPhone in uPlat) then Result := 'Phone' else if (upTablet in uPlat) then result := 'Tablet' else if (upDesktop in uPlat) then result := 'PC'; end; function TUniMainModule.DetectModel: string; begin if (upiPad in uPlat) then Result := 'iPad' else if (upiPod in uPlat) then Result := 'iPod' else if (upiPhone in uPlat) then Result := 'iPhone' else if (upAndroid in uPlat) then Result := 'Android' // Mobile Device else if (upDesktop in uPlat) then Result := 'Desktop'; // PC end; function TUniMainModule.DetectOperationSystem: string; begin if (upAndroid in uPlat) then Result := 'Android' else if (upiOS in uPlat) then Result := 'iOS' else if (upDesktop in uPlat) then Result := 'Desktop OS'; end; function TUniMainModule.DetectPlatform: string; begin if (upDesktop in uPlat) then result := 'Desktop' else if (upMobile in uPlat) then result := 'Mobile'; end;
  9. I have tried the following but it fails MessageDlg('Choose', mtConfirmation, [mbOK, mbYes, mbNo, mbCancel], MyCallback); UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[0].innerHTML="A"'); UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[1].innerHTML="B"'); UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[2].innerHTML="C"'); UniSession.AddJS('Ext.select("#ext-messagebox .x-button .x-text-el").elements[3].innerHTML="D"'); Please advise - thanks
  10. Sent to you Sherzod via private message.
  11. I have a UniMap(Leaflet) rendered inside a UniURLFrame, the scrollbars belong to the UniURLFrame and scroll the oversized map canvas correctly by mouse interaction, I want to do the scrolling by manipulating the scrollbars via code.
  12. I have oversized content displayed within a UniURLFrame (complete with both Horizontal & Vertical Scrollbars displayed and working as expected). Please advise how I can scroll the displayed content within the UniURLFrame via code at runtime ? //UniURLFrame1.SetXY(1, 1500, nil); // FAILS RENDERS BLANK //UniURLFrame1.JSInterface.JSCall('iframe.contentDocument.scrollingElement.scrollBy', [1, 1500, False]); // FAILS NOTHING HAPPENS //UniURLFrame1.JSInterface.JSCall('iframe.contentDocument.scrollingElement.scrollTo(1, 1500)'); // FAILS NOT A FUNCTION //UniURLFrame1.JSInterface.JSCall('iframe.contentDocument.scrollingElement.scrollTop = 1500'); // FAILS NOT A FUNCTION //UniURLFrame1.JSInterface.JSCall('iframe.contentWindow.document.scrollingElement.scrollTo', ['top', 1500]); // FAILS NOTHING HAPPENS //UniURLFrame1.JSInterface.JSCall('iframe.contentWindow.scroll(1, 1500)'); // FAILS NOT A FUNCTION
  13. Happy to test but cannot fetch your rar file (cannot read Chinese on the file share site) - please advise basic http download url - thanks
  14. Server Level: CurDir:= GetCurrentDir; Dir:= LowerCase(ExtractFilePath(ParamStr(0))); if SetCurrentDir(Dir) = True then begin
  15. I stopped using cookies a long time ago, why not use local storage with your own encryption.
  16. Thanks, what about TSparkleUtils ?
  17. Which Delphi unit does TRestNewUtils come from ?
  18. I am trying to force GoogleMaps to FullScreen via code (MainFormDisplayMode:= mfPage;). Please advise how - Thanks in advance Played with <div s:= '<div id="uni_map_canvas" style="position: absolute; width: 100%; height: 100%"> '+ ' <iframe '+ ' src="https://www.google.com/maps/embed/v1/place?key=xxx" '+ ' width="100%" '+ ' height="100%" '+ ' style="border:0;" '+ ' allowfullscreen '+ ' referrerpolicy="no-referrer-when-downgrade" '+ ' loading="lazy" '+ ' > '+ ' </iframe> '+ '</div>'; UniHTMLFrame1.HTML.Add(s); Played with CSS s:= '.google-maps ' + '{ '+ ' position: relative; '+ ' padding-bottom: 75%; '+ ' height: 0; '+ ' overflow: hidden; '+ '} '+ '.google-maps iframe '+ '{ '+ ' position: absolute; '+ ' top: 0; '+ ' left: 0; '+ ' width: 100% !important; '+ ' height: 100% !important; '+ '} '; CustomCSS.Add(s); s:= '.box '+ '{ '+ ' height: 100%; '+ '} '+ '.box iframe '+ '{ '+ ' width: 100%; '+ ' height: 100%; '+ ' border: none; '+ '} '+ 'html, body '+ '{ '+ ' margin: 0; '+ ' padding: 0; '+ ' width: 100%; '+ '} '+ 'body '+ '{ '+ ' font-family: "Helvetica Neue", sans-serif; '+ ' font-weight: lighter; '+ ' height: 100%; '+ '} '; CustomCSS.Add(s);
  19. I would like to save the GoogleMap Image already rendered inside HtmlFrame, please advise how - thanks
  20. A quick look tells me you are referencing a dynamically generated component name "O1D_id" This will change, not a good idea.
  21. Understood, but a necessary feature I believe Sencha should consider - thanks Sherzod for your time.
  22. Sorry Sherzod, this is not a proper solution. The Calendar Object should have a Print Method / Export Method built within it - not a screen shot.
×
×
  • Create New...