Jump to content

andyhill

uniGUI Subscriber
  • Posts

    1266
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by andyhill

  1. unim-1.50.0.1481 UnimSelect.Items.Add(''); // or ' ' UnimSelect.Items.Add('1'); UnimSelect.Items.Add('2'); UnimSelect.Items.Add('3'); if UnimSelect.ItemIndex was 2 ('2') and user select 0 ('') the ItemIndex is not updated to 0 due to the blank string
  2. I know this is the Desktop Forum but I am tired of the Mobile Forum postings being overlooked -or- not addressed regularly enough. As stated, My Mobile Application uses TUnimSelect and If the First Item = '' (blank string) then it Fails To Show In Desktop Emulation ? It works as intended on Mobile Platforms. Yes I know I can have a clearable button but it is too close to the select button and fat fingers fires it when it should not. Please advise.
  3. My code AV's at runtime, please advise - thanks. SystemMenu.BeginUpdate; SystemMenu.Items.Clear; // FAILS TO CLEAR TreeMenu !!! //SystemMenu.SourceMenu.Items.Clear; for i:= 0 to Length(UniMainModule.MyTreeMenuItems)-1 do begin // Parent Nodes if ( (i < 15) or (i = 19) or (i = 25) or (i = 32) or (i = 39) ) then begin pNode:= SystemMenu.Items.Add(nil, 'Parent'); pNode.Text:= UniMainModule.MyTreeMenuItems.Name; pNode.SelectedIndex:= i; end; // Child Nodes (uses previous pNode eg. i=14=pNode, i=15=cNode) if ( ((i > 14) and (i < 19)) or ((i > 19) and (i < 25)) or ((i > 25) and (i < 32)) or ((i > 32) and (i < 39)) ) then begin cNode:= SystemMenu.Items.AddChild(pNode, 'Child'); cNode.Text:= UniMainModule.MyTreeMenuItems.Name; cNode.SelectedIndex:= i; end; end; SystemMenu.EndUpdate; UniSession.AddJS(MainmForm.SystemMenu.JSName+'.Refresh;'); UniSession.Synchronize; Above compiles and runs but throws abstract errors. I know it may have something to do with reusing pNode and cNode objects ???
  4. I maintain an array of TreeMenu Items and create TreeMenu Nodes at runtime from this master list. Please show me how to Create Parent Node (with no children) and Parent Node with Children Node - thanks. for i:= 0 to Length(UniMainModule.MyTreeMenuItems)-1 do begin case i of // Parent (no children) 0..2: begin SystemMenu.Items.Add(UniMainModule.MyTreeMenuItems.Name); end; 3..4: begin SystemMenu.Items.Add(UniMainModule.MyTreeMenuItems.Name); end; 5..8: begin SystemMenu.Items.Add(UniMainModule.MyTreeMenuItems.Name); end; 9: begin SystemMenu.Items.Add(UniMainModule.MyTreeMenuItems.Name); end; // Parent (with children) 10: begin SystemMenu.Items.Add(UniMainModule.MyTreeMenuItems.Name); end; // Child 11..14: begin SystemMenu.Items.AddChild(10, UniMainModule.MyTreeMenuItems.Name); end; ...
  5. The author says "SSL under non - Windows platform is unstable, please do not use it in production environment"
  6. In Mobile it puts all of the FieldLabels to the Right of the Form, we need Caption Alignment not just FieldLabel alignment.
  7. Although I can use UnimHTMLFrame.HTML.Add to accomplish this, as a learning piece can I have help to do this via the UnimHTMLFrame aftercreate Event as well. I have been having intermittent API Key Registration Failures (iPhoneX) with Google Map API (initialised in ServerModule CustomFiles) so I am trying to simulate the adding of CustomFiles with the UnimHTMLFrame aftercreate Event in order to execute the following URL (API Key Registration) but I get the following error (see attachment) - please advise - thanks in advance. function aftercreate=aftercreate(sender) { window.location = "https://maps.googleapis.com/maps/api/js?key=mykeygoeshere&callback=initMap"; }
  8. I have A Complex Table (minimised here for simplicity), Please advise how I can set each row color in the itemTpl based on a DBListGrid Data Value. ListGrid.ClientEvents.UniEvents.Add('beforeInit=function beforeInit(sender, config)'+ '{'+ 'config.itemTpl='+ '<table style="width:100%; white-space: nowrap; vertical-align:middle;">'+ ' <tr bgcolor={[this.getColour(values)]}'+ ' <td "Test Data"/td>'+ ' </tr>'+ '</table>,'+ ' {'+ ' getColour: function(values)'+ ' {'+ ' if(values[1] == true) return "#FF00FF";'+ ' else return "#00FF00";'+ ' }'+ ' };'+ '<img onclick="javascript:xxxxx"/>'+ '}' );
  9. Working On a Mobile Platform Kiosk Concept (click/tap on Hot Zones and respond with both graphic and text information about the zone). UniGUI Mobile has no Mobile Canvas Object so I am trying to improvise using the Mobile Image Canvas. Problem is the Mobile Image Object does not have Click/Tap X/Y implementation (browser/frame click/tap X/Y does not reference the Image Canvas) as well as other deficiencies. I tried using HTML Frame but that posed even bigger problems. Farshad is looking into this, I hope he does not take too long. Andy Melbourne Australia
  10. How can I change the Scale (zoom) of a TUnimImage in code ? Please advise.
  11. Yes, real X,Y on Image canvas irrespective of zoom
  12. Please show how to add Mouse Click (tap) listener and retrieve X,Y Position on Canvas.
  13. I have a Mobile TMainmForm TUnimContainerPanel TUnimPanel TUnimHTMLFrame All perfectly displayed on iOS Device. I want to work with the HTMLFrame canvas which is declared in HTML as //HTMLFrame.HTML.Add(' <canvas id = "andy" width = "'+IntToStr(ContainerPanel.Width+43)+'" height = "'+IntToStr(ContainerPanel.Height+84)+'" style = "border: 1px solid #000000;">'); HTMLFrame.HTML.Add(' <canvas id = "andy" width = "'+IntToStr(Panel.Width+43)+'" height = "'+IntToStr(Panel.Height+84)+'" style = "border: 1px solid #000000;">'); //HTMLFrame.HTML.Add(' <canvas id = "andy" width = "100%" height = "100%" style = "border: 1px solid #000000;">'); //HTMLFrame.HTML.Add(' <canvas id = "andy" width = "'+IntToStr(UniApplication.ScreenWidth-2)+'" height = "'+IntToStr(UniApplication.ScreenHeight-2)+'" style = "border: 1px solid #000000;">'); Why can I not get correct width/height for canvas, my best fit was Panel.Width+43 and Panel.Height+84 which is unique to my iPhoneX and incorrect for any other mobile device. How can I get correct pixel dimensions to declare for my canvas ? Please advise - thanks in advance.
  14. The above reference is to Touch (as you know we are now 6.6.0) with other forum users saying it does not work. (They use a Desktop Canvas in a Mobile project which no longer compiles). As an interim, how can we use TUnimImage. Image: TUnimImage; // Contains Image URL (Parent is Panel) ... procedure TMainmForm.UnimFormReady(Sender: TObject); begin UniSession.AddJS('ajaxRequest(MainmForm.Panel, "_Draw", []);'); end; procedure TMainmForm.PanelAjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName = '_Draw' then begin Image.Picture.Bitmap.Canvas.Lock; Image.Picture.Bitmap.Canvas.Pen.Width:= 4; Image.Picture.Bitmap.Canvas.Pen.Color:= clBlack; Image.Picture.Bitmap.Canvas.MoveTo(10, 10); Image.Picture.Bitmap.Canvas.LineTo(20, 20); Image.Picture.Bitmap.Canvas.UnLock; end; end; Running on Desktop line fails to show ? Running on Mobile project times out, does not run.
  15. How can we draw on any mobile object canvas ? Please give me something to work with.
  16. Trying to test. My Google Account OAuth-2.0-Client-ID does not show ReDirect Option ? Please advise - thanks Authorized domains To protect you and your users, Google only allows applications that authenticate using OAuth to use Authorized Domains. Your applications' links must be hosted on Authorized Domains. Learn more Application Homepage link Shown on the consent screen. Must be hosted on an Authorized Domain. Application Privacy Policy link Shown on the consent screen. Must be hosted on an Authorized Domain. Application Terms of Service link (Optional) Shown on the consent screen. Must be hosted on an Authorized Domain. Save Submit for verification Cancel
  17. Ellipse and Text. I think off memory you have shown canvas text out in another post. This must all work on Mobile.
  18. Thank you, I look forward to the answers
×
×
  • Create New...