Jump to content

andyhill

uniGUI Subscriber
  • Posts

    1258
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by andyhill

  1. This works for TUnimTreeMenu CustomCSS.Add('.x-treelist-nav'); CustomCSS.Add('{'); CustomCSS.Add(' overflow-y: auto'); CustomCSS.Add('}'); How do we do the same with TUnimMenu ? The JS code below fails UniSession.AddJS('Ext.onReady(function(){'+ Menu.JSName +'.setConfig({scrollable:"vertical", width:"20%"});})');
  2. Please advise CSS for Mobile Menu Scroll overflow-y: auto
  3. By setting FileUpload.Accept:= ''; and FileUpload.Capture:= ''; before FileUpload.Execute; we give the end user the options to choose - this is fine. However, how do we know from within the FileUploadCompleted event if it was a camera capture -or- library file ? This is very important as iOS camera images need rotating where as Library images do not.
  4. Please advise how UniGUI to upload to dropbox (can incorporate CallBack for success/failure):- 1) Using OAuth2 (user interaction) 2) Using Token (no user interaction) Thanks in advance (* DFM object RESTClient1: TRESTClient Authenticator = OAuth2Authenticator1 Params = <> HandleRedirects = True Left = 32 Top = 440 end object RESTRequest1: TRESTRequest Client = RESTClient1 Params = <> Response = RESTResponse1 SynchronizedEvents = False Left = 104 Top = 440 end object RESTResponse1: TRESTResponse Left = 192 Top = 440 end object OAuth2Authenticator1: TOAuth2Authenticator AccessToken = 'mytoken' ClientID = 'myclientid' ClientSecret = 'mysecret' Left = 304 Top = 440 end *) procedure TUniMainModule.UploadtoCloud(file_path: String); var LURL, cloud_path, local_filename, local_file_path: String; upload_stream: TFileStream; begin //path : the path to the file you want to update local_filename:= 'test.txt'; cloud_path:= 'Test\'; //file : Absolute path to the local file you want to upload local_file_path:= 'D:\TK\uniGUI\WebApp\Win64\Debug\test.txt'; //change Request Settings RESTRequest1.Method:= TRestRequestMethod.rmPUT; // REST.Types RESTClient1.BaseURL:= 'https://api-content.dropbox.com/1/'; //Using auto, automatically selects dropbox or sandbox folders LURL:= 'files_put/auto/'+ EncodeURIComponent(cloud_path); RESTRequest1.Resource:= LURL; //Open File to FileStream upload_stream:= TFileStream.Create(local_file_path, fmOpenRead); upload_stream.Position:= 0; //Set Content-Type to text/plain RESTRequest1.Params.AddHeader('Content-Type', 'text/plain'); //Set Request Body to FileStream RESTRequest1.ClearBody; RESTRequest1.AddBody(upload_stream, TRESTContentType.ctTEXT_PLAIN); try RESTRequest1.Execute; except on e: Exception do begin ShowMessage(e.Message); end; end; upload_stream.Free; end;
  5. I have a web app that uses say 3 forms (Login, Main, FileUpload). Calling DropBox from FileUpload form - How can I give DropBox my FileUpload form URL to communicate with ?
  6. I have a MainmForm with TitleButtons either side of the Form's Caption. I want to be able to process Caption Click in addition to the title button clicks. Please advise how - thanks in advance.
  7. Thank You, I look forward to it.
  8. Looks interesting, you said "I have attached the demo project" but I see no attachment ?
  9. I am trying to change TitleButton Icon at runtime with the following code but it paints BLANK instead of icon - please advise - thanks. UniSession.AddJS(GPSmForm.TitleButtons[2].JSName + '.setIconCls("add")');
  10. Thanks, I tried this earlier but missed it's results in my coding cycle.
  11. I have a need to read the Title of the Marker being dragged but all my attempts fail, everything else works as expected - please advise how to read the Title inside the Listener Event - Thanks in advance. ' marker.addListener("drag", dragEvent);'+ ' function dragEvent(event)'+ ' {'+ ' var latitude = event.latLng.lat(); '+ ' var longitude = event.latLng.lng(); '+ ' var myTitle = marker.title; '+ // this.title(), this.getTitle(), event.title(), event.getTitle(), marker.title(), marker.getTitle() ' ajaxRequest(GPSmForm.UnimHTMLFrame1, "_BgnDragPoint", ["Lat="+latitude, "Lng="+longitude, "Title="+myTitle]);'+ ' }'+
  12. Thanks Gerhard, I checked out Leaflet and found that with Australia data it does not show house locations like Google and others. My goal is to use Google Maps with Polylines (all good now). Additionally I want the option (I will call it edit mode) to Add Points into the Polyline, Delete Points from the Polyline and most importantly Drag Polyline Points to new positions whilst viewing the map.
  13. Gerhard, I am so sorry that it was a typo - I put it down to old age - thank you. I am however interested in your leaflet project to see if it has good coverage. Also, at present Google seems to have the most exhaustive coverage so probably in Australia we would have to stick with Google. My dream would be to have Interactive Google PolyLines (add/delete/drag points) then retrieve point info for DB storage.
  14. Thanks Gerhard, your solution is to use a GoogleMap Component which I do not do. If I can add Markers, Circles and Images without a component surely I can add PolyLines ? I would appreciate getting my sample code above to work.
  15. I have been able to draw markers and circles fine but am having problems with polylines, can someone please advise - thanks. UniSession.AddJS('var gm = googleMap; '+ 'if (typeof gm == "object") '+ '{ '+ ' var PathCoordinates = '+ ' ['+ ' {lat: -37.842521707298296, lng: 144.6705822349851},'+ ' {lat: -37.84328847009031, lng: 144.6718965174024},'+ ' {lat: -37.84340920273167, lng: 144.67219424260304},'+ ' {lat: -37.84345580124215, lng: 144.67245307577298}'+ ' {lat: -37.84412353348225, lng: 144.67519362283394},'+ ' {lat: -37.84445395544746, lng: 144.67542965722726},'+ ' {lat: -37.84683464430723, lng: 144.67503269029305},'+ ' {lat: -37.846206649771126, lng: 144.66954341367773},'+ ' {lat: -37.84302853810139, lng: 144.67027782310845},'+ ' {lat: -37.84251570967168, lng: 144.6705956648767}'+ ' ];'+ ' var MyPolyline = new google.maps.Polyline'+ ' ('+ ' {'+ ' path: PathCoordinates,'+ ' geodesic: false,'+ ' strokeColor: ''#FF0000'','+ ' strokeOpacity: 1.0,'+ ' strokeWeight: 2'+ ' }'+ ' );'+ ' MyPolyline.setMap(gm);'+ '} ' );
  16. The following code adds a button to the slider as expected. with UnimSlider1.JSInterface do begin JSCode(#1'.bodyElement.insertSibling('+ BitBtn.JSName +'.element, "after");'); I need to set the Buttons Height to 48 pixels, please advise how - thanks in advance
  17. Looking Good Gerald, when will it be available ?
  18. GerhardV, Are we any closer to a Mobile Touch Theme (like the original Touch) ?
  19. Any progress ? Sent from my iPhone using Tapatalk
×
×
  • Create New...