Jump to content

JDDEV

uniGUI Subscriber
  • Posts

    73
  • Joined

  • Last visited

Everything posted by JDDEV

  1. Hi, I find a solution : I use UniURLFrame and i read a HTML file with this line : <input id="testBtn" value="saa1" type="button" onclick="top.ajaxRequest(top.MainForm., '_test', [])"> When i click on "TestBtn" the UniFormAjaxEvent procedure show me "Test" Best regards
  2. Hi, I have the same problem with your example. When i click on "TestBtn" button my MainForm doesn't receive any event !? Have you got an other solution ? Thanks
  3. Thank you for this example...but when i try to use it with the browser FireFox or Chrome, the TUniURLFrame (htmlcam) is not showing the webcam pictures. Do you know why ? (I show this screen)
  4. I do the testcase with the GridCellStyle demo project. procedure TMainForm.UniDBGrid1DrawColumnCell(Sender: TObject; ACol, ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs); begin if ACol = 1 then begin //Attribs.Style.Cls:= 'myShadowStyle'; // style is defined in file "files/mycss.css" //Attribs.Style.Style := 'border: 5px solid green; font: red' // define a style directly Attribs.Font.Color:=clYellow; Attribs.Font.Style:=[fsItalic]; Attribs.Color:=clRed; Attribs.Style.Padding := '5px'; end else if ACol = 2 then Attribs.Style.Padding := '0px'; // force image to fit in the cell end;
  5. Hi, When i add this line after : Attribs.Style.Padding:='5px'; The Attribs.Font et Attribs.Color properties are not enabled !! Is it a bug ? Thanks
  6. Hi all, I am trying to sort columns on a UniDBGrid. To initialize my TFDMemTable (cds_Articles) i do : with cds_Articles do begin Indexes.Clear; for I := 0 to FieldCount-1 do begin IndexnameAsc := Fields.FieldName+'_index_asc'; IndexnameDes := Fields.FieldName+'_index_des'; with Indexes.Add do begin Name := IndexnameAsc; Fields := cds_Articles.Fields.FieldName+':A'; Active := True; end; with Indexes.Add do begin Name := IndexnameDes; Fields := cds_Articles.Fields.FieldName+':D'; Active := True; end; end; end; On DBGRidColumnSort event i do : UniMainModule.SortColumn(UniMainModule.cds_Articles, Column.FieldName, Direction); On UniMainModule.SortColumn i do : procedure TUniMainModule.SortColumn(const cds:TFDMemTable; const FieldName: string; Dir: Boolean); begin if Dir then cds.IndexName := FieldName+'_index_asc' else cds.IndexName := FieldName+'_index_des'; end; When i click on the item menu of a DBGrid Column i have a Ajax Error with Unexpected token message. {"metaData":{"totalProperty":"results","root":"rows","fields":["0","_0","1","_1","2","_2","3","_3","4","_4","5","_5","6","_6","7","_7","8","_8","9","_9","10","_10","11","_11","12","_12","13","_13","14","_14","15","_15","16","_16","17","_17","18","_18","19","_19","20","_20","21","_21","_x","_r"]},"success":true, "results":4, "rows":[{"id":0,"0":false,"_0":"{fs:'padding:5px;'}","1":true,"_1":"{fs:'padding:5px;'}","2":"S0SAXA0","_2":"{fs:'padding:5px;'}","3":"PROD-DD","_3":"{fs:'padding:5px;'}","4":"A","_4":"{fs:'padding:5px;'}","5":"Buildable","_5":"{fs:'padding:5px;'}","6":"610SAXLA | Streptavidin-XL665 - 5,000 tests","_6":"{fs:'padding:5px;'}","7":"610SAXLA","_7":"{fs:'padding:5px;'}","8":1095,"_8":"{fs:'padding:5px;'}","9":"30/12/1899","_9":"{fs:'padding:5px;'}","10":"TA","_10":"{fs:'padding:5px;'}","11":415,"_11":"{fs:'padding:5px;'}","12":0,"_12":"{fs:'padding:5px;'}","13":34.6,"_13":"{fs:'padding:5px;'}","14":34.6,"_14":"{b:'#FF8080',fs:'padding:5px;'}","15":33,"_15":"{fs:'padding:5px;'}","16":248,"_16":"{fs:'padding:5px;'}","17":true,"_17":"{fs:'padding:5px;'}","18":"SK0AGA0|1\x3Cbr\x3ESTKA|1\x3Cbr\x3ESK0A|1\x3Cbr\x3ESK1A|1\x3Cbr\x3ESK2A|1\x3Cbr\x3ESK3A|1","_18":"{fs:'padding:5px;'}","19":"- SK0AGA0 (1)\x3Cbr\x3E- STKA (1)\x3Cbr\x3E- SK0A (1)\x3Cbr\x3E- SK1A (1)\x3Cbr\x3E- SK2A (1)\x3Cbr\x3E- SK3A (1)","_19":"{fs:'padding:5px;'}","20":true,"_20":"{fs:'padding:5px;'}","21":"\x3Cb\x3ECalcul de la moyenne au lot\x3C/b\x3E\x3Cbr\x3EDate de lancement non renseignée !\x3Cbr\x3EMOY_LOT_CORR SK0AGA0 = 1*(0-\x3E1.2 / 12)\x3Cbr\x3EMOY_LOT_CALC STKA = 1*(83.0 / 12)\x3Cbr\x3EMOY_LOT_CALC SK0A = 1*(26.0 / 12)\x3Cbr\x3EMOY_LOT_CALC SK1A = 1*(45.0 / 12)\x3Cbr\x3EMOY_LOT_CALC SK2A = 1*(32.0 / 12)\x3Cbr\x3EMOY_LOT_CALC SK3A = 1*(22.0 / 12)\x3Cbr\x3EMOY_LOT_CALC S0SAXA0 = 1*(207.0 / 12)\x3Cbr\x3EMOY_LOT_CALC = 0.1 + 6.9 + 2.2 + 3.8 + 2.7 + 1.8 + 17.3","_21":"{fs:'padding:5px;'}","_x":1,"_r":0},{"id":1,"0":false,"_0":"{fs:'padding:5px;'}","1":true,"_1":"{fs:'padding:5px;'}","2":"S0SAXB0","_2":"{fs:'padding:5px;'}","3":"PROD-DD","_3":"{fs:'padding:5px;'}","4":"A","_4":"{fs:'padding:5px;'}","5":"Buildable","_5":"{fs:'padding:5px;'}","6":"610SAXLB | Streptavidin-XL665 - 20,000 tests","_6":"{fs:'padding:5px;'}","7":"610SAXLB","_7":"{fs:'padding:5px;'}","8":1095,"_8":"{fs:'padding:5px;'}","9":"30/12/1899","_9":"{fs:'padding:5px;'}","10":"TA","_10":"{fs:'padding:5px;'}","11":103,"_11":"{fs:'padding:5px;'}","12":0,"_12":"{fs:'padding:5px;'}","13":8.6,"_13":"{fs:'padding:5px;'}","14":8.6,"_14":"{b:'#FF8080',fs:'padding:5px;'}","15":27,"_15":"{fs:'padding:5px;'}","16":214,"_16":"{fs:'padding:5px;'}","17":true,"_17":"{fs:'padding:5px;'}","18":"","_18":"{fs:'padding:5px;'}","19":"","_19":"{fs:'padding:5px;'}","20":true,"_20":"{fs:'padding:5px;'}","21":"\x3Cb\x3ECalcul de la moyenne au lot\x3C/b\x3E\x3Cbr\x3EDate de lancement non renseignée !\x3Cbr\x3EMOY_LOT_CALC S0SAXB0 = 103.0 / 12\x3Cbr\x3EMOY_LOT_CALC = 8.6","_21":"{fs:'padding:5px;'}","_x":1,"_r":1},{"id":2,"0":false,"_0":"{fs:'padding:5px;'}","1":true,"_1":"{fs:'padding:5px;'}","2":"S0SAXG0","_2":"{fs:'padding:5px;'}","3":"PROD-DD","_3":"{fs:'padding:5px;'}","4":"A","_4":"{fs:'padding:5px;'}","5":"Buildable","_5":"{fs:'padding:5px;'}","6":"610SAXLG | Streptavidin-XL665 - 3 mg","_6":"{fs:'padding:5px;'}","7":"610SAXLG","_7":"{fs:'padding:5px;'}","8":3650,"_8":"{fs:'padding:5px;'}","9":"30/12/1899","_9":"{fs:'padding:5px;'}","10":"TA","_10":"{fs:'padding:5px;'}","11":271,"_11":"{fs:'padding:5px;'}","12":0,"_12":"{fs:'padding:5px;'}","13":22.7,"_13":"{fs:'padding:5px;'}","14":22.7,"_14":"{b:'#FF8080',fs:'padding:5px;'}","15":21,"_15":"{fs:'padding:5px;'}","16":166,"_16":"{fs:'padding:5px;'}","17":true,"_17":"{fs:'padding:5px;'}","18":"SK0BGA0|1\x3Cbr\x3ESK0JGA0|5\x3Cbr\x3ESTKB|1\x3Cbr\x3ESTKJ|5\x3Cbr\x3ESK1B|1\x3Cbr\x3ESK2B|1\x3Cbr\x3ESK3B|1\x3Cbr\x3ESK1J|1\x3Cbr\x3ESK2J|1\x3Cbr\x3ESK3J|1","_18":"{fs:'padding:5px;'}","19":"- SK0BGA0 (1)\x3Cbr\x3E- SK0JGA0 (5)\x3Cbr\x3E- STKB (1)\x3Cbr\x3E- STKJ (5)\x3Cbr\x3E- SK1B (1)\x3Cbr\x3E- SK2B (1)\x3Cbr\x3E- SK3B (1)\x3Cbr\x3E- SK1J (1)\x3Cbr\x3E- SK2J (1)\x3Cbr\x3E- SK3J (1)","_19":"{fs:'padding:5px;'}","20":true,"_20":"{fs:'padding:5px;'}","21":"\x3Cb\x3ECalcul de la moyenne au lot\x3C/b\x3E\x3Cbr\x3EDate de lancement non renseignée !\x3Cbr\x3EMOY_LOT_CORR SK0BGA0 = 1*(0-\x3E1.2 / 12)\x3Cbr\x3EMOY_LOT_CORR SK0JGA0 = 5*(0-\x3E1.2 / 12)\x3Cbr\x3EMOY_LOT_CALC STKB = 1*(54.0 / 12)\x3Cbr\x3EMOY_LOT_CALC STKJ = 5*(24.0 / 12)\x3Cbr\x3EMOY_LOT_CALC SK1B = 1*(23.0 / 12)\x3Cbr\x3EMOY_LOT_CALC SK2B = 1*(8.0 / 12)\x3Cbr\x3EMOY_LOT_CALC SK3B = 1*(14.0 / 12)\x3Cbr\x3EMOY_LOT_CALC SK1J = 1*(13.0 / 12)\x3Cbr\x3EMOY_LOT_CORR SK2J = 1*(0-\x3E1.2 / 12)\x3Cbr\x3EMOY_LOT_CALC SK3J = 1*(2.0 / 12)\x3Cbr\x3EMOY_LOT_CALC S0SAXG0 = 1*(37.0 / 12)\x3Cbr\x3EMOY_LOT_CALC = 0.1 + 0.5 + 4.5 + 10.0 + 1.9 + 0.7 + 1.2 + 1.1 + 0.1 + 0.2 + 3.1","_21":"{fs:'padding:5px;'}","_x":1,"_r":2},{"id":3,"0":false,"_0":"{fs:'padding:5px;'}","1":true,"_1":"{fs:'padding:5px;'}","2":"S0SAXK0","_2":"{fs:'padding:5px;'}","3":"PROD-DD","_3":"{fs:'padding:5px;'}","4":"A","_4":"{fs:'padding:5px;'}","5":"Buildable","_5":"{fs:'padding:5px;'}","6":"610SAXLF | Streptavidin-XL665 - 1,000 tests","_6":"{fs:'padding:5px;'}","7":"610SAXLF","_7":"{fs:'padding:5px;'}","8":1095,"_8":"{fs:'padding:5px;'}","9":"30/12/1899","_9":"{fs:'padding:5px;'}","10":"TA","_10":"{fs:'padding:5px;'}","11":9,"_11":"{fs:'padding:5px;'}","12":0,"_12":"{fs:'padding:5px;'}","13":0.8,"_13":"{fs:'padding:5px;'}","14":0.8,"_14":"{b:'#FF8080',fs:'padding:5px;'}","15":2,"_15":"{fs:'padding:5px;'}","16":50,"_16":"{fs:'padding:5px;'}","17":true,"_17":"{fs:'padding:5px;'}","18":"","_18":"{fs:'padding:5px;'}","19":"","_19":"{fs:'padding:5px;'}","20":true,"_20":"{fs:'padding:5px;'}","21":"\x3Cb\x3ECalcul de la moyenne au lot\x3C/b\x3E\x3Cbr\x3EDate de lancement non renseignée !\x3Cbr\x3EMOY_LOT_CALC S0SAXK0 = 9.0 / 12\x3Cbr\x3EMOY_LOT_CALC = 0.8","_21":"{fs:'padding:5px;'}","_x":1,"_r":3}]}O1FB.load({params:{options:1}});O242.setText("610SAXLA | Streptavidin-XL665 - 5,000 tests\x3Cbr\x3E\x3Cbr\x3E\x3Cb\x3EComposant de\x3C/b\x3E\x3Cbr\x3E- SK0AGA0 (1)\x3Cbr\x3E- STKA (1)\x3Cbr\x3E- SK0A (1)\x3Cbr\x3E- SK1A (1)\x3Cbr\x3E- SK2A (1)\x3Cbr\x3E- SK3A (1)\x3Cbr\x3E\x3Cbr\x3E\x3Cb\x3ECalcul de la moyenne au lot\x3C/b\x3E\x3Cbr\x3EDate de lancement non renseignée !\x3Cbr\x3EMOY_LOT_CORR SK0AGA0 = 1*(0-\x3E1.2 / 12)\x3Cbr\x3EMOY_LOT_CALC STKA = 1*(83.0 / 12)\x3Cbr\x3EMOY_LOT_CALC SK0A = 1*(26.0 / 12)\x3Cbr\x3EMOY_LOT_CALC SK1A = 1*(45.0 / 12)\x3Cbr\x3EMOY_LOT_CALC SK2A = 1*(32.0 / 12)\x3Cbr\x3EMOY_LOT_CALC SK3A = 1*(22.0 / 12)\x3Cbr\x3EMOY_LOT_CALC S0SAXA0 = 1*(207.0 / 12)\x3Cbr\x3EMOY_LOT_CALC = 0.1 + 6.9 + 2.2 + 3.8 + 2.7 + 1.8 + 17.3",false); It seems like a JSon format and i think it is because there are '<' and '>' tag on data columns (some data have HTML content to format report of the row). How can i resolve this error ? Thanks.
  7. I am waiting for a get and a set function to manage values, but if it is not possible PropertyChange Event is the solution. Thanks.
  8. Thanks, it is working well. And now, i would like to get a property value...i don't find the function to do that ;( Do you have the solution ?
  9. Thanks. If i well understand, it is not possible to have a property with a combobox editor and a list of items to choice ?
  10. Thanks, it is working well , Is it a bug ? Is it possible to define type of properties ? (boolean, list of items...)
  11. I have just modified these lines from the demo : procedure TMainForm.UniComboBox1Change(Sender: TObject); var componentName:string; begin componentName := UniComboBox1.Items[UniComboBox1.ItemIndex]; if componentName='Perso' then begin UniPropertyGrid1.AttachedComponent := Nil; UniPropertyGrid1.AddProperty(['Prop1', 'Value1', 'Prop2', 'Value2']); end else UniPropertyGrid1.AttachedComponent := MainForm.FindComponent(componentName); end;
  12. Hi, this is a testcase from the demo "Property Grid". Property Grid.zip
  13. Thanks, I do exactly the same code, but the result is empty What is wrong ? PS : i use version n° 1.90.0.1496
  14. Hi all, I would like to use a uniPropertyGrid component without a AttachedComponent : just like a TValueListEditor component. I find the AddProperty function but i don't find an explicit help to use it. Is it possible to work with uniPropertyGrid like a TValueListEditor ? Thank you
  15. Hi, here is my suggestion: myScrollBox.ClientEvents.ExtEvents.Values['afterrender']:='function afterrender(sender, eOpts) {sender.getEl().dom.style["overflow-x"]="hidden";;}'; Or MyScrollBox -> ClientEvets -> ExtEvents -> function afterrender: function afterrender(sender, eOpts) { sender.getEl().setStyle('overflow-x', 'hidden') }
  16. Hi, I would like to customize the Title property of the UniServerModule. When i change the property at runtime in the UniServerModule.Create event function, the title doesn't change on the Hint of the icon (taskbar). Is it possible to do that ? Thanks
  17. I find the problem ! A bad Copy/Paste of the class name in the .DFM file !
  18. The program work fine (compilation + runing), but i can't open the "Main.pas" unit on Delphi without error : "UniMainForm" not defined ? What is wrong in Delphi ???
  19. That is the code of my First unit : unit UniMainForm; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, uniGUITypes, uniGUIAbstractClasses, uniGUIClasses, uniGUIForm , uDefUser {a unit to manager user}; type TUniMainForm = class(TUniForm) procedure UniFormCreate(Sender: TObject); private { Private declarations } public { Public declarations } user:TUser; end; implementation {$R *.dfm} uses UniGUIVars, MainModule, uniGUIApplication; procedure TUniMainForm.UniFormCreate(Sender: TObject); begin initUser(user, True); end; initialization RegisterMainFormClass(TUniMainForm); end. That is the code of my 2d unit : unit Main; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, DateUtils , Vcl.Imaging.GIFImg, Vcl.Menus, Vcl.Imaging.jpeg, Vcl.Imaging.pngimage , Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls, Buttons, Data.DB , uniGUITypes, uniGUIForm, UniListBox, UniMemo, UniLabel, UniPanel, UniPageControl, UniButton, UniSpeedButton, uniGUIRegClasses, uniguiclasses, uniMultiItem, UniBitBtn, uniGUIBaseClasses, uniSplitter, uniComboBox, uniScreenMask, uniHTMLMemo, uniBasicGrid, uniDBGrid, uniRadioGroup, uniGroupBox, uniSpinEdit, uniDateTimePicker, uniMainMenu, uniCheckBox, uniImage, uniRadioButton, uniScrollBox , uniMainForm ; type TMainForm = class(TUniMainForm) PanelUtilisateur: TUniPanel; BtnDeconnectUser: TUniSpeedButton; UniPanelTop: TUniPanel; UniLogoMini: TUniImage; UniLabelTitre: TUniLabel; UniPanelFond: TUniPanel; UniPanelActions: TUniPanel; LabelUtilisateur: TUniLabel; bkImage: TUniImage; UniScrollBox1: TUniScrollBox; BtnAction1: TUniBitBtn; BtnAction2: TUniBitBtn; BtnAction3: TUniBitBtn; BtnAction4: TUniBitBtn; procedure UniFormCreate(Sender: TObject); procedure UniFormShow(Sender: TObject); procedure BtnDeconnectUserClick(Sender: TObject); procedure UniFormScreenResize(Sender: TObject; AWidth, AHeight: Integer); procedure BtnAction1Click(Sender: TObject); procedure BtnAction2Click(Sender: TObject); procedure BtnAction3Click(Sender: TObject); procedure BtnAction4Click(Sender: TObject); private { Private declarations } idFct:byte; bNeedConnexion:boolean; procedure GoAction(id:byte; bRefresh:boolean=False); public { Public declarations } function GetIdAction : byte; end; function MainForm: TMainForm; implementation {$R *.dfm} uses UniGUIVars, MainModule, UniGUIApplication, ServerModule; //------------------------------------------------------------------------------ function MainForm: TMainForm; begin Result := TMainForm(UniMainModule.GetFormInstance(TMainForm)); end; procedure TMainForm.UniFormCreate(Sender: TObject); begin ... end; procedure TMainForm.UniFormShow(Sender: TObject); begin ... end; procedure TMainForm.UniFormScreenResize(Sender: TObject; AWidth, AHeight: Integer); begin GoAction(idFct); end; procedure TMainForm.BtnDeconnectUserClick(Sender: TObject); begin close; end; procedure TMainForm.BtnAction1Click(Sender: TObject); begin GoAction(1); end; procedure TMainForm.BtnAction2Click(Sender: TObject); begin GoAction(2); end; procedure TMainForm.BtnAction3Click(Sender: TObject); begin GoAction(3); end; procedure TMainForm.BtnAction4Click(Sender: TObject); begin GoAction(4); end; //------------------------------------------------------------------------------ function TMainForm.GetIdAction : byte; begin result:=idFct; end; procedure TMainForm.GoAction(id:byte; bRefresh:boolean); var w,h:integer; titre:string; bOk:boolean; begin if (user.Login='')and(idFct>0) then exit; ... end; end.
  20. that's not work anymore :( It was working the first time....but when i the project and then re-open it...there are warning dialogs and a message "Read error form UniMainForm".
  21. Sorry....i've just fond the solution myself ! 1) I've created a new "application form" with the IDE 2) I've customized properties et functions of this form 3) I've used this new class for the inheritance of my main application form
  22. Hi, I would like to create a new component with a inheritance from TuniForm class. On Delphi IDE the new component assistant interface doesn't permit to select TuniForm class ! Is it possible do to inheritance on this object class ? Thanks
  23. Thank you, but i always tried that, and that solution increase margin between the left border and icon. I would like to increase margin between the icon and text. Best regards
  24. Thanks it works fine Is it possible to increase margin between icon and text ?
×
×
  • Create New...