Jump to content

mikeog

uniGUI Subscriber
  • Posts

    15
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by mikeog

  1. UniCalendarDialog has a caption property but there is no caption displayed when the dialog is executed. Is the a way to show a caption when the dialog is displayed? Thanks, Mike
  2. I'm trying to implement a timecard entry screen and I want the grid columns to display in the format hh:mm (easy) and to only allow a time to be entered in edit mode (very difficult). Getting existing values to display in the hh:mm format simply requires the DataFormat of the field to be set to hh:mm. However, unlike the VCL DBGrid, the field EditMask property doesn't seem to enforce a date entry. I have tried hh:mm and !9000;1;_ and some other common edit masks but the grid column in the UniDbGrid will accept any input. As an alternative, I tried to use a UniDateTimePicker as an in-place editor and this does enforce a correct date entry but, the dropdown list shows 01:01, 01:01, 01:01,01:01, 02:01, 02:01, 02:01, etc. instead of 01:00, 01:15, 01:30, 01:45, 02:00, 02:15, etc. Using a UniDBDateTimePicker and linking that to the underlying field does give a proper dropdown list but, after picking a time from the list and pressing Enter, the grid shows the wrong value, e.g. picking 15:45 from the list results in 15:01 being displayed when Enter is pressed. After the record is posted, the correct time is shown but, it would be very confusing for the user. Has anybody had any success in implementing edit masks for UniDBGrids? Mike
  3. Hi Lema, I didn't use Patmap's component because I was looking for a simple solution and I didn't particularly want to install a dedicated map component. However, I just looked at the demo of your component and it looks very good. Maybe I will install a map component after all Thanks, Mike
  4. Just in case anybody else is interested, I tried a variety of "solutions" that I found in online searches and none of them worked. So I gave up on the idea of clearing the markers and simply reloaded a fresh map whenever the location changed.
  5. Thanks Zilav, Looks like I am still in a pure Delphi mode and I need to adjust my mindset to a different way of thinking. Mike
  6. Thanks Zilav. Maybe if I explain exactly what I am trying to do, you will see why I want to save the UniHTMLFrame image. My application has a Client Record form which contains a UniHTMLFrame to display the client's location on a Google map. A summary of the Client Record can be printed, using FastReports, and I want to include the Google map image on this summary report to help in locating the client's address. The attached images show how it looks in the original application, which used a TWebBrowser to display the map. The TWebBrowser allows access to the ViewObject using: WebBrowser1.Document.QueryInterface(IViewObject, viewObject) which can then be drawn on a bitmap canvas and saved to a stream, from which it can be used by the report. I thought that the PaintTo method of UniHTMLFrame would allow me to do something similar but, it seems not. Perhaps an Ajax event might do the trick, but I am not smart enough to know where to begin. Maybe if I rephrased the original topic title as "How do I include a Google Map from a UniHTMLFrame in a report?" it would describe my problem more accurately. Thanks, Mike
  7. Has anybody used the PaintTo method of UniHTMLFrame? I want to save the contents of the UniHTMLFrame as an image so that it can be included in a report but I am struggling. I have tried using a UniImage and a UniCanvas as the target but all I get is a blank image. Any help/pointers would be appreciated. Mike
  8. Can anybody tell me how to clear the location marker in Google Maps when the map is centered on a new location? I am useless with JScript so I am struggling. I am using the following script to clear the existing markers (not working) and to display the new position and set the marker (working). TheAddress := Uniedit1.Text; UniSession.AddJS( 'function clearOverlays() {'+ 'if (window.markersArray.length > 0) {'+ 'for (var idx=0;idx<=window.markersArray.length;idx++){'+ 'window.markersArray[idx].setMap(null);'+ '}'+ '}'+ '};'+ 'function codeAddress() {'+ 'var geocoder = new google.maps.Geocoder();'+ 'var address = '+QuotedStr(TheAddress)+';' 'geocoder.geocode( { ''address'': address}, function(results, status) {'+ 'if (status == google.maps.GeocoderStatus.OK) {'+ 'if (typeof googleMap=="object") {googleMap.setCenter(results[0].geometry.location)};'+ 'var marker = new google.maps.Marker({'+ 'map: googleMap,'+ 'position: results[0].geometry.location'+ '});'+ 'window.markersArray.push(marker);'+ 'googleMap.setZoom(18);'+ '} else {'+ 'alert(''Geocode was not successful for the following reason: '' + status);'+ '}'+ '});'+ '};'+ 'clearOverlays();'+ 'codeAddress();' ); The error that I am getting is "Cannot call method setMap of undefined" which suggest that the markersArray is not visible to the function. I have tried adding the global markers array in the HTML of the UniHTMLFrame and as a global variable prior to running the script but I am only going round in circles at this stage. Any suggestions would be appreciated. Mike
  9. Dear Farshad, Thank you, thank you, thank you!!! I downloaded for the first time exactly one week ago and started converting a Delphi 2010 desktop application which contains 23 forms and 10 reports. After just one week, most of it spent learning the differences between desktop and web applications, I have just 4 forms remaining to convert. What a change from Delphi's "VCL for the Web" which I found almost useless. My application is a "Conference Management System" for conferences (local committees) of the Society of St. Vincent de Paul and it stores information about our clients and finances on a hosted MySQL database. Because of the sensitive nature of the data, encryption of key data was an essential requirement and, until now, I couldn't see how to do this with a web-based solution (without learning Java which I don't fancy doing). uniGUI is BRILLIANT! Apart from some compromises in the UI, such as replacing a JvNavigationPanel with a UniTreeView, and other minor changes, my application looks much the same, and runs exactly the same, in the browser as in the original desktop application. If Embarcadero have any sense, they will make you an offer you can't refuse. uniGUI makes Delphi a compelling choice for developing Rich Internet Applications and gives Delphi developers an extra advantage in being able to deploy fully functional applications in a browser. Thanks again and congratulations on a superb job, Mike O'Grady, Aquila Technology, Ireland.
×
×
  • Create New...