Jump to content

RobYost

uniGUI Subscriber
  • Posts

    207
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by RobYost

  1. UniPanel3.ClientEvents.ExtEvents.Add('OnAfterrender=function OnAfterrender(sender)' + ' { sender.setBodyStyle("border-color","#ff0000"); }'); UniPanel3.ClientEvents.ExtEvents.Add('OnAfterrender=function OnAfterrender(sender)' + ' { sender.setBodyStyle("border-width","15"); }'); UniPanel3.ClientEvents.ExtEvents.Add('OnAfterrender=function OnAfterrender(sender)' + ' { sender.setBodyStyle("background-color","#ffff00"); }'); This changes the background color to yellow, but the border is still black and 1 px wide. I put this in TUniFrameCreate(Sender: TObject)
  2. What I tried was from Erich Wanker's example: was.ClientEvents.ExtEvents.Add ('OnAfterrender=function OnAfterrender(sender)'+ ' { sender.setBodyStyle("border-color:#0000ff'"); }'); but this did nothing. When I tried background-color, like his example it did work. Is border-color: the correct parameter?
  3. TUniPanel does not seem to have the same color as TUniListbox or TUniTreeView. These other controls have a color from the theme choosen, but TUniPanel's border is black (or maybe dark gray) Is there a solution to this? GroupBox and RadioBox are also of a different color.
  4. Is it possible to add a background image to a TUniStringGrid
  5. RobYost

    New Computer

    Yes, that was the problem. Thank you.
  6. RobYost

    New Computer

    I just installed Delphi and UniGui. When I run a UniGui project in the debugger I get: --------------------------- Debugger Exception Notification --------------------------- Project Project1.exe raised exception class EUniSessionException with message 'Invalid session or session Timeout.'. --------------------------- Break Continue Help --------------------------- procedure TIdCustomHTTPServer.DoCommandGet(AContext: TIdContext; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo: TIdHTTPResponseInfo); begin if Assigned(FOnCommandGet) then begin FOnCommandGet(AContext, ARequestInfo, AResponseInfo); end; end; It works fine if I click run without debugging. I can even attach to the process. Does anyone have any idea what I've done wrong with the installation?
  7. in your main form: public FrameDigialcao: TFrameDigalcao; end (or private if you don't need it elsewhere) When you need to use the frame: if (FrameDigialcao = nil) then FrameDigialcao := TFrameDigialcao.Create(self); FrameDigitacao.UniDBEdit5.SetFocus;
  8. I call it before I fill the tree, I may fill the tree multiple times. For instance, anytime they make a change that will affect the tree. I also call it on browser close, and I call it when my main form closes. This prevents the memory leak I was having. Also, I don't remember exactly, but as I remember the for loop has to be downto, when I did the for loop normally, something bad happened, but I don't recall what that was.
  9. This is what I do: for i := aTreeView.Items.Count - 1 downto 0 do begin aNodeData := aTreeView.Items[i].Data; if assigned(aNodeData) then Dispose(aNodeData); aTreeView.Items.Delete(aTreeView.Items[i]); end;
  10. I need to make some reports; what report writer do you people recommend. Right now the only one I have looked at is FastReports. I currently own Report-Builder, but it is cheaper to buy FastReports than to upgrade ReportBuilder. Is it possible to write a vcl program that creates a report as a pdf and display the pdf in UniGui?
  11. I only have one reservation left about purchasing. I am worried that Embarcadero will buy UniGui and I will have to get updates from Embarcadero to get new UniGui updates. I really can't afford to spend a $1000/year (minimum, plus more every year) for Delphi every year to just to get the UniGui updates that I really need. I have upgraded from Delphi 4 to XE6,(not every update) but it is really getting too expensive. I am probably still going to buy this, but I am worried I will have to keep up with all the Delphi updates.
  12. Thanks, that fixed it. I was nervous about uninstalling, but it worked perfectly.
  13. I have somehow messed up my installation. My program now just has the blue square and says loading.... The UniFormCreate break point is hit, but that is all. I tried your demos...The same problem except the Touch demos still work (even after clean...build) What should I do to fix this problem? Thanks in advance.
  14. I am interested in the Notify,Wait, Place Holder Edit and ComboBox. But I only need them in the Mobile version. Are you planning on converting any of these to mobile?
  15. function reconfigure(sender, store, columns, oldStore, the, eOpts) { columns[0].align = 'center'; columns[1].align = 'left'; columns[2].align = 'right'; } Thanks for the reply. I don't know anything about javascript, if that is even what is used in your example. Is there somewhere you recommend to read about this? For example where the events are described? I would not have thought to look in the reconfigure event. Also, is it more efficient to use the client events? What is the advantage of your example. Once again thank you for your example.
  16. In case anyone needs to know how to do this: gMileage.Cells[6, i] := '<div align="right">' + format('%.1f', [ds.FieldByName('Start').AsFloat]) + '</div>'; I am new to HTML and maybe some of you are too.
  17. RobYost

    CheckListBox

    Is there any way to implement a checkListbox with the controls we currently have?
  18. I read the topic: https://unigui.wikispaces.com/How+to+improve+loading+time and added the suggested lines. UniSession.AddJS('Ext.suspendLayouts()'); UniSession.AddJS(gUnpaidCharges.JSName + '.store.suspendEvents();'); ... UniSession.AddJS(gUnpaidCharges.JSName + '.store.resumeEvents();'); UniSession.AddJS(gUnpaidCharges.JSName + '.view.refresh();'); UniSession.AddJS('Ext.resumeLayouts(true)'); I timed the code and it goes through the code very fast (35ms) But it takes 6 seconds for the grid to load. It has about 50-60 lines in it. It seems to take about the same amount of time to load with and without the suspendEvents added. Do I have them entered wrong? I also tried: UniSession.AddJS('Ext.suspendLayouts()'); UniSession.AddJS('frmMain.fraTIncome.gUnpaidCharges.store.suspendEvents();'); ... UniSession.AddJS('frmMain.fraTIncome.gUnpaidCharges.store.resumeEvents();'); UniSession.AddJS('frmMain.fraTIncome.gUnpaidCharges.view.refresh();'); UniSession.AddJS('Ext.resumeLayouts(true)'); This is fast but it never redraws (The grid stays blank) The main form is: frmMain it has a frame on it: fraTIncome it has a TUniStringGrid on it: gUnpaidCharges Here is the slow code: ds := CreateDataSet(sql); try gUnpaidCharges.RowCount := 1; gUnpaidCharges.RowCount := ds.RecordCount + 1; UniSession.AddJS('Ext.suspendLayouts()'); UniSession.AddJS(gUnpaidCharges.JSName + '.store.suspendEvents();'); while ds.EOF = False do begin curDue.Value := curDue.Value + ds.FieldByName('Amount').AsCurrency; gUnpaidCharges.cells[0, ds.RecNo] := fmtDate(ds.FieldByName('ChargeDate').AsDateTime); gUnpaidCharges.cells[1, ds.RecNo] := FmtCur(ds.FieldByName('Amount').AsCurrency); gUnpaidCharges.cells[2, ds.RecNo] := ds.FieldByName('Description').AsString; gUnpaidCharges.cells[3, ds.RecNo] := IntToStr(DaysBetween(now, ds.FieldByName('ChargeDate').AsDateTime)); gUnpaidCharges.cells[DUE_COL, ds.RecNo] := FmtCur(ds.FieldByName('AmountLeft').AsString); gUnpaidCharges.cells[6, ds.RecNo] := ds.FieldByName('Memo').AsString; gUnpaidCharges.cells[CID_COL, ds.RecNo] := ds.FieldByName('ChargeID').AsString; ds.Next; UniSession.AddJS(gUnpaidCharges.JSName + '.store.resumeEvents();'); UniSession.AddJS(gUnpaidCharges.JSName + '.view.refresh();'); UniSession.AddJS('Ext.resumeLayouts(true)'); end; finally ds.Close; ds.Free; end;
  19. I had tried that, but I didn't realize I had another frame. It was the second one that was set globally, even though I had changed the first one. Thanks.
  20. When I moved fraTIncome: TfraTIncome; Public declarations area of (TfraTIncome) I couldn't figure out how to reference it. Do I add this? . function TfraTIncome: TfraTIncome; begin Result := TfraTIncome(UniMainModule.GetFormInstance(TfraTIncome)); end;
  21. tsTenant is a tabsheet on the main form. This is created in the main form. procedure TfrmMain.LoadEntity(aNode: TUniTreeNode); begin ... if (fraTenantDetails = nil) then fraTenantDetails := TfraTenantDetails.Create(self); fraTenantDetails.Align := alClient; fraTenantDetails.Parent := tsTenant; { TODO 1: core dump } end;
  22. unit fTenantDetails; interface uses ... type TfraTenantDetails = class(TUniFrame) pgTenantBottom: TUniPageControl; tsScheduledCharges: TUniTabSheet; UniSimplePanel1: TUniSimplePanel; sgRecurringCharges: TUniStringGrid; tsLease: TUniTabSheet; lblLeaseBegin: TUniLabel; dateLeaseBegin: TUniDateTimePicker; edtRoommateName: TUniEdit; edtRoommateAddress: TUniMemo; edtRoommateOther: TUniMemo; tsTenantNotes: TUniTabSheet; ... procedure UniFrameCreate(Sender: TObject); procedure pgTenantBottomChange(Sender: TObject); private procedure LoadScheduledCharges(); function rtnDateRangeDesc(StartDate, EndDate: TDate): string; public { Public declarations } end; var fraTenantDetails: TfraTenantDetails; implementation {$R *.dfm} uses
  23. Do you have a Tree.UpdateBegin When I put that at the start FullExpand does not work.
×
×
  • Create New...