Jump to content

andyhill

uniGUI Subscriber
  • Posts

    1263
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by andyhill

  1. Using UniCanvas I build many polygons and flood fill some. I am having issues with this polygon and FloodFill (not others) - please advise - Thanks 387/134 385/133 380/132 375/133 373/135 371/139 371/144 373/150 377/161 383/171 385/175 385/176 385/177 385/179 386/187 390/194 394/195 400/195 400/194 399/190 398/185 396/178 394/169 391/159 387/134 // I suspect the winding direction of the polygon points // Right, Down p.X:= PlyArray[0].X+1; // PlyArray[0].X+2; PlyArray[0].X-1; PlyArray[0].X-2; p.Y:= PlyArray[0].Y + 1; // PlyArray[0].Y + 2; PlyArray[0].Y - 1; PlyArray[0].Y - 2; //p.X:= PlyArray[n].X+1; // PlyArray[n].X+2; PlyArray[n].X-1; PlyArray[n].X-2; //p.Y:= PlyArray[n].Y + 1; // PlyArray[n].Y + 2; PlyArray[n].Y - 1; PlyArray[n].Y - 2; // My Point "p" Is Inside the Polygon by a few pixels, if I make sure "p" has say 10px margin from the edges then in it fills, 2px margin it does not if PointInPolygon(p, PlyArray) = True then begin cArea.MoveTo(p.X, p.Y); HoldColour:= cArea.Brush.Color; HoldOpacity:= cArea.Brush.Opacity; cArea.Brush.Color:= FillColour; cArea.Brush.Opacity:= 0.25; cArea.FloodFill(p.X, p.Y); cArea.Brush.Color:= HoldColour; cArea.Brush.Opacity:= HoldOpacity;
  2. Please advise the code changes required to work as is on Mobile but resolve Desktop Emulation issue.
  3. I use UniGUI Mobile (for over 3yrs now) and from my understanding you can only access what ever the Browser allows you to access, when necessary the Browser may require https transport (Camera etc.).
  4. Farshad, We have changed ServerModule: FontAwesomeVersion:= fontAws5; Now how do we set the Mobile TUnimDBListGrid and TUnimTreeMenu icons to work in Desktop Emulation Mode "/m" ? Please provide complete code changes - Thanks in advance
  5. Updated today and tested 4 of my Projects. Problems: (1) Mobile Desktop Emulation "/m" image links partly broken, Disclose, SubMenu etc. (see images below) ? (2) Dynamic unimTreeMenu timing issues, runtime changes (Delete/Add/Change) take much longer so I had to introduce UniSession.AddJS('Ext.defer(function() {ajaxRequest(MainmForm.ContainerPanel, "_menuC_", []);}, 500)');
  6. For the benefit of others: I have found that traversing a Data Bound Grid does not necessarily Sync the Grid Row with the bound DataSource every time, particularly when breaking out of the grid code via some sort of event. My work around:- DataSource.DataSet.Edit; DataSource.DataSet.Post; This forces the Grid to ReSync the highlighted Row with the Bound DataSource.
  7. This will take time as I am very busy, give me some time ...
  8. Third CheckBox using 'left' and 'top' (makes no difference) ' style: ''left: 10px; top: 2px;'','#13#10 + Andy
  9. This is rendered on a Microsoft Surface NoteBook via Chrome (this is a very Hi-Resolution device).
  10. NoStyle (see below) WithStyle (see below), as mentioned before the Style is only partially working for me (I want the CheckBox centered horizontally as well), please advise how. ' style: ''margin: 2px; padding: 2px 2px 2px 2px;'','#13#10 +
  11. Perfect Sherzod, Thank You. Any thoughts on the Margin / Padding comments above ?
  12. UPDATE (1) I have managed to get Checkbox Tips working after a lot of experimentation (2) I have sort of got Padding working although it appears that it is only half implemented by Sencha ' {'#13#10 + ' xtype: '#39'checkbox'#39','#13#10 + ' id: ''ckOne'','#13#10 + ' width: 24,'#13#10 + ' height: 24,'#13#10 + ' tip: '#39'InAction'#39','#13#10 + ' style: ''margin: 2px; padding: 2px 2px 2px 2px;'','#13#10 + // Top, Right, Bottom, Left ' listeners: '#13#10 + ' { '#13#10 + ' render: function(c) '#13#10 + ' { '#13#10 + ' Ext.create(''Ext.tip.ToolTip'', '#13#10 + ' { '#13#10 + ' target: c.getEl(), '#13#10 + ' html: c.tip '#13#10 + ' } '#13#10 + ' ); '#13#10 + ' }, '#13#10 + ' change: function(el, v) '#13#10 + ' { '#13#10 + ' ajaxRequest(sender, "_InAction_", ["val="+v]) '#13#10 + ' } '#13#10 + ' } '#13#10 + ' },'#13#10 + style: renders the margin but not the padding, however if padding is omitted then margin is ignored ! (3) How do I set the ckOne.checked:= True/False; in JSCall ? dbGridFriends.JSInterface.JSCall('pagingBar.getComponent("ckOne").Checked = False', []); FAILS, Please advise ASAP - Thanks
  13. s:= 'Ext.onReady(function() '+ '{ '+ ' Ext.MessageBox.buttonText = '+ ' { '+ ' ok: "OK", '+ ' cancel: "Cancel", '+ ' yes: "Families", '+ ' no: "Groups", '+ ' abort: "Noticeboard" '+ ' }; '+ '} '+ '); '; MessageDlg('Email PDF', mtConfirmation, [mbYes, mbNo, mbCancel, mbAbort], MessageDlgCallBack); FAILS TO DISPLAY ABORT BUTTON ???
  14. I have the CheckBox in the Grid PagingBar, I have the Listener firing Ajax events showing current state of CheckBox - ALL GOOD. Can you please show me in code how to :- Add Padding to CheckBox (Position it equally between the Seperators) Add ToolTip to the CheckBox (Add flyout hint) Based on my script code below 'pagingBar.afterCreate=function pagingBar.afterCreate(sender)'#13#10 + '{'#13#10 + ' sender.add('#13#10 + ' [ '#13#10 + ' {'#13#10 + ' xtype: '#39'tbseparator'#39#13#10 + ' },'#13#10 + ' {'#13#10 + ' xtype: '#39'checkbox'#39','#13#10 + ' width: 24,'#13#10 + ' height: 24,'#13#10 + //' padding: 5px,'#13#10 + // FAILS JAVASCRIPT //' tooltip: '#39'Filter: InAction'#39','#13#10 + // DOES NOTHING ' listeners: '#13#10 + ' { '#13#10 + ' render: function(c) '#13#10 + ' { '#13#10 + ' Ext.QuickTips.register('#13#10 + ' { '#13#10 + ' target: c, '#13#10 + ' text: ''Filter: InAction'' '#13#10 + // DOES NOTHING ' }); '#13#10 + ' }, '#13#10 + ' change: function(el, v) '#13#10 + ' { '#13#10 + ' ajaxRequest(sender, "_InAct_", ["val="+v]) '#13#10 + // WORKS ' } '#13#10 +
  15. The Grid PagingBar CheckBox added above (xtype: '#39'checkbox'#39','#13#10 +)
  16. Also how to add tooltip to checkbox - Thanks
  17. Please show CheckBox Padding Options - Thanks
  18. Grid Setup ... ' {'#13#10 + ' xtype: '#39'tbseparator'#39#13#10 + ' },'#13#10 + ' {'#13#10 + ' xtype: '#39'checkbox'#39','#13#10 + ' width: 24,'#13#10 + ' height: 24,'#13#10 + // NEED LEFT and TOP Padding Here ' tooltip: '#39'Filter: InAction'#39','#13#10 + ' handler: function() '#13#10 + ' {'#13#10 + ' ajaxRequest(sender, '#39'_InAct_'#39', []); '#13#10 + ' } '#13#10 + ' },'#13#10 + ' {'#13#10 + ' xtype: '#39'tbseparator'#39#13#10 + ' }'#13#10 + ... ////////////////////////////////////////////////////////////////////////////// if EventName = '_InAct_' then begin // Fires But TUniCheckBox(Sender).Checked State is UnStable Here UniSession.AddJS('ajaxRequest(fMain.dbGrid, ''_InActChk_'', ["Obj="+Sender]);'); // Send CheckBox Object Here via Ajax to read state after stabilized - HOW end; ////////////////////////////////////////////////////////////////////////////// if EventName = '_InActChk_' then begin // NEVER FIRES if TUniCheckBox(Params.Values['Obj']).Checked = True then begin // Read CheckBox Object State Here - HOW s:= 'checked'; end else begin s:= 'un-checked'; end; end;
  19. I thought it was very clear, change height of Form at runtime, my temporary Desktop work around below. BeginUpdate; Height:= (n * (StartUpFontHeight * 2)) + 14; EndUpdate;
  20. n:= (dbGridGroups.Height div (StartUpFontHeight * 2)); dbGridGroups.WebOptions.PageSize:= n-4; // Paints Footer row even when there are no summaries or footers TAccessGrid(dbGridGroups).Columns.EndUpdate; //////////////////////////////////////////////////////////////////////////// pMain.Height:= (n * (StartUpFontHeight * 2)) + 4; //fMain.BeginUpdate; // uniAlignmentClient (needed for mobile emulation) //fMain.ClientHeight:= pMain.Height + 10; // FAILS TO CHANGE //fMain.EndUpdate; UniSession.AddJS('ajaxRequest(fMain.form, ''setHeight'', '+IntToStr(pMain.Height + 10)+');'); // FAILS TO CHANGE
  21. IDE Desktop Grid Assigned Editors at runtime fail to re assign - please advise. //////////////////////////////////////////////////////////////////////////// cbGender.BeginUpdate; cbGender.Items.Clear; cbGender.Items.Add(''); cbGender.Items.Add('Male'); cbGender.Items.Add('Female'); cbGender.EndUpdate; //////////////////////////////////////////////////////////////////////////// TAccessGrid(dbGridFriends).Columns.BeginUpdate; TAccessGrid(dbGridFriends).Columns.Clear; ... // Gender TAccessGrid(dbGridFriends).Columns.Add; TAccessGrid(dbGridFriends).Columns.Items.FieldName:= 'Gender'; TAccessGrid(dbGridFriends).Columns.Items.Visible:= True; TAccessGrid(dbGridFriends).Columns.Items.Title.Alignment:= taLeftJustify; TAccessGrid(dbGridFriends).Columns.Items.Title.Caption:= 'Gender'; TAccessGrid(dbGridFriends).Columns.Items.Width:= 65; TAccessGrid(dbGridFriends).Columns.Items.Editor:= cbGender; // FAILS TO ASSIGN AT RUNTIME (cbGender is on a Hidden Panel) ??? TAccessGrid(dbGridFriends).Columns.Items.Font.Color:= clBlack; TAccessGrid(dbGridFriends).Columns.Items.ShowSummary:= False;
  22. ////////////////////////////////////////////////////////////////////////////// // mbYes, mbNo, mbCancel // THESE FAIL //UniSession.AddJS('Ext.Msg.getStandardButtons().ok.text="OK"'); //UniSession.AddJS('Ext.Msg.getStandardButtons().yes.text="Families"'); //UniSession.AddJS('Ext.Msg.getStandardButtons().no.text="Groups"'); //UniSession.AddJS('Ext.Msg.getStandardButtons().cancel.text="Cancel"'); ?? This WORKS Script.Clear; s:= 'Ext.onReady(function() '+ '{ '+ ' Ext.MessageBox.buttonText = '+ ' { '+ ' ok: "OK", '+ ' cancel: "Cancel", '+ ' yes: "Families", '+ ' no: "Groups" '+ ' }; '+ '} '+ '); '; Script.Add(s); Incidentally I want a PRIVATE solution for each use, not a Form Wide solution.
×
×
  • Create New...