Jump to content

JasonReid

Members
  • Posts

    89
  • Joined

  • Last visited

  • Days Won

    2

JasonReid last won the day on February 17 2022

JasonReid had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

JasonReid's Achievements

Member

Member (2/4)

4

Reputation

  1. Ahh .. I see what you mean..Be interesting to see if you can find a solution for this. There seems to be a way to do it with ExtJS but how to integrate it is another story.
  2. I think one of the demos shows how to do this : http://prime.fmsoft.net/demo/memoimage.dll
  3. here you go, hope this helps. I have a calculated field in my dataset called ISSUES_TImageIcon. I just set the text for that to a valid HTML tag and the browser knows how to render it in the grid. procedure TDataModule1.ISSUES_TCalcFields(DataSet: TDataSet); Var aStatus : String; begin aStatus := Uppercase(ISSUES_TISSUE_STATUS.Value); If aStatus = 'CLOSED' then ISSUES_TImageIcon.Value := '<img width=16 height=16 src="images/tick.bmp"/>' Else if aStatus = 'RESEARCHING' then ISSUES_TImageIcon.Value := '<img width=16 height=16 src="images/research.bmp"/>' Else if aStatus = 'REPORTED' then ISSUES_TImageIcon.Value := '<img width=16 height=16 src="images/reported.bmp"/>' Else if aStatus = 'CAN CLOSE' then ISSUES_TImageIcon.Value := '<img width=16 height=16 src="images/flag_green.bmp"/>' Else ISSUES_TImageIcon.Value := '<img width=16 height=16 src="images/open.bmp"/>' ; end;
  4. Hi.. Its just a warning, if it bothers you change : constructor create(Aowner :TComponent);override; to : constructor Create(Aowner :TComponent);override; (Capital on Create)
  5. Only if you want to deploy application commercially.
  6. Hi Ronny Theme property is here:
  7. Anyone managed to do drag and drop between two treeviews ? I've played with the clientEvents but no results.
  8. You're right, that was one of the problems, I corrected it and the header looks right now but the controls in the body still don't show. <head> <title>New Application</title> <meta http-equiv="content-type" content="charset=utf-8" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="pragma" content="no-cache" /> <link rel=stylesheet href="ext-3.4.0/resources/css/uni-ext.css" /> <link rel=stylesheet href="ext-3.4.0/resources/css/ext-all.css" /> <script src="ext-3.4.0/adapter/ext/ext-base.js"></script> <script src="ext-3.4.0/ext-sync-1.3.9-min.js"></script> <script src="ext-3.4.0/ext-all.js"></script> <script src="ext-3.4.0/examples/ux/ux-all.js"></script> <link rel=stylesheet href="ext-3.4.0/resources/css/xtheme-blue.css" /> <link rel=stylesheet href="ext-3.4.0/examples/ux/css/ux-all.css" /> <link rel=stylesheet href="ext-3.4.0/resources/css/uni-xtheme-blue.css" /> <link rel=stylesheet href="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css" /> <script src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script src="http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.js"></script> <script src="ext-3.4.0/codemirror-0.8/js/codemirror.js"></script> <link rel=stylesheet href="ext-3.4.0/codemirror-0.8/css/csscolors.css" /> <script src="ext-3.4.0/codemirror-0.8/js/Ext.ux.CodeMirror.js"></script> <script src="ext-3.4.0/ext-unigui-1.3.9-min.js"></script> </head> The body is simple : <body> <div data-role="page"> <div data-role="header"> <h1>My Title</h1> </div><!-- /header --> <div data-role="content"> <p>Hello world</p> </div><!-- /content --> </div><!-- /page --> </body>
  9. Hi Farshad I'm trying to add some jquery-mobile stuff to my Unigui app with a TUniHTmlFrame but the styling doesn't seem to be working. I have added http://code.jquery.com/jquery-1.4.3.min.js http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js to customfiles and http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css to customCSS, but my jquery controls are not showing in the TuniHtmLFrame. the head section looks like this : <html> <head> <title>Iris FlexiForms</title> <meta http-equiv="content-type" content="charset=utf-8" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="pragma" content="no-cache" /> <link rel=stylesheet href="ext-3.4.0/resources/css/uni-ext.css" /> <link rel=stylesheet href="ext-3.4.0/resources/css/ext-all.css" /> <script src="ext-3.4.0/adapter/ext/ext-base.js"></script> <script src="ext-3.4.0/ext-sync-1.3.8-min.js"></script> <script src="ext-3.4.0/ext-all.js"></script> <script src="ext-3.4.0/examples/ux/ux-all.js"></script> <link rel=stylesheet href="ext-3.4.0/resources/css/xtheme-gray.css" /> <link rel=stylesheet href="ext-3.4.0/examples/ux/css/ux-all.css" /> <link rel=stylesheet href="ext-3.4.0/resources/css/uni-xtheme-gray.css" /> <link rel=stylesheet href="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css" /> <script src="http://code.jquery.com/jquery-1.4.3.min.js"></script> <script src="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.js"></script> <script src="ext-3.4.0/codemirror-0.8/js/codemirror.js"></script> <link rel=stylesheet href="ext-3.4.0/codemirror-0.8/css/csscolors.css" /> <script src="ext-3.4.0/codemirror-0.8/js/Ext.ux.CodeMirror.js"></script> <script src="ext-3.4.0/ext-unigui-1.3.8-min.js"></script> <style type="text/css">http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css</style> </head> Any ideas ?
  10. JasonReid

    Grid multiline

    You can use normal html formatting in a stringgrid
  11. Hi Farshad. I've been playing with the google map api, passing data back and forth using the ajax methods and and I'm really beginning to appreciate the power there. I was wondering if i can pass something more complex, like arrays this way ? if so, how do I unwrap it in Delphi/JS . Or should I be using JSON to pass data around, if so, is there a nice way to wrap/and unwrap the json on either side ? The reason I ask is because at one point i was looking for a way to create a bunch of markers on the map using lat/long values. i thought maybe I could bundle up a bunch of values and pass them back with my response, and then unwarap them client side and run a "addmarker" function for each element of the data. i prefer to keep the JS and delphi seperate and avoid doing things like this (eg) : procedure TMapFRM1.CalcRoute(start_lat,start_long, end_lat,end_long: double); begin if WebMode then UniSession.AddJS('if (typeof googleMap=="object")' + '{' + 'var directionsDisplay = new google.maps.DirectionsRenderer();' + 'var directionsService = new google.maps.DirectionsService();' + 'directionsDisplay.setMap(googleMap); ' + 'var request = {origin:,destination:,travelMode: google.maps.TravelMode.DRIVING};' + 'directionsService.route(request, function(result, status) {' + ' if (status == google.maps.DirectionsStatus.OK) {' + ' directionsDisplay.setDirections(result);' + ' }' + '});' + '}'); end; eventually i ended up writing the AddMarker function in js and then calling it in an iterative loop : procedure TMapFRM1.AddMarker(s_lat, s_long,s_name : ansistring); begin UniSession.AddJS('addMarker('+s_lat+','+s_long+',"' + s_name+'")'); LBX1TestLBX.Items.Add(s_lat + '-' + s_long); end; ... | | ... I := UniMainModule.Props.Execute(s_sql,[],@Calls); while I.step() do begin AddMarker(Calls.latitude, Calls.longitude, Calls.calloid); end; in the html I have : <head> <script type="text/javascript"> function addMarker(lat,long,nme){ //alert('add a marker ' + nme); var image = "/files/tools.png"; var latlng = new google.maps.LatLng(lat,long); var marker = new google.maps.Marker({ position: latlng, title:"Call number" + nme, id:nme, icon:image }); marker.setMap(googleMap); google.maps.event.addListener(marker, 'click', function() { //alert(marker.id); ajaxRequest(MapFRM1.mapHTF1,'showcalldetails',['calloid='+marker.id]); }); } </script> </head> this kind of feels right, but I might be missing the point ... Keep up the brilliant work!
  12. If you are looking for options, I've had an embedded unigui app running on a low-memory Ubuntu Virtual private server under WINE. there were a few anomalies like the taskbar menu not showing, but generally it ran well.
  13. is there a background image in the GridEditor demo ?
  14. Hi Akim If you have a look at my little mock up Here you can get an idea of how to format text using in-line html. Hope this helps.
×
×
  • Create New...