Jump to content

Ario.Paxaz

uniGUI Subscriber
  • Posts

    315
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by Ario.Paxaz

  1. Hi

     

    I write below code,But

    const
      magicnumber = 500;
    
    procedure TMainForm.Button2Click(Sender: TObject);
    var
      I, J: Integer;
      X, Y: Word;
    begin
      I := 0;
      J := 0;
    
      UniLabel1.Caption:='The Button2Click handler has started';
    
      while I < magicnumber do
      begin
        Randomize;
        while J < magicnumber do
        begin
          Y := Random(J);
          Inc(J);
          Sleep(10);
        end;
        X := Random(I);
        Inc(I);
      end;
      UniLabel1.Caption:='The Button2Click handler is finished';
    
    end;
    

    This line code ,

      UniLabel1.Caption:='The Button2Click handler has started';
    

    Don't Work.I have unipanel and put unilabel1 on it.and set unipanel   AlignmentControl to uniAlignmentClient.

     

    Best Regards.

  2. Hi

     

    You'r parenid filed in table or query must be nil.

    ID	MyId	idparent
    1	40	99
    2	42	99
    3	32	90
    4	30	90
    5	58	91
    6	50	91
    7	99	0
    8	91	99
    9	90	0
    

    b6j1_untitled.jpg

     

    Best Regards.

    • Upvote 1
  3. Hi

     

    I Used it,but I have error.

    1738_untitled.jpg

     

    I change Form to main form name,and use my main form in uses list ,but error appear.

      Main.ShowMask('Loading');
      UniSession.Synchronize();
      UniMainModule.ADOQuery1.Open;
      Main.HideMask;
    

    Best Regards.

  4. Hi

     

    In UniDbGrid ,columns don't get CustomConstraint.

    I Create UniDbGrid in Runtime and set fields,But UniDbGrid columns don't have CustomConstraint that Field in dataset has.

    I write below code

          For i := Columns.Count - 1 DownTo 0 do
             Columns[i].Field.CustomConstraint:=ASource.DataSet.Fields[i].CustomConstraint;
    

    But Show below Error

     

    First chance exception at $0040BF8A. Exception class $C0000005 with message 'access violation at 0x0040bf8a: write of address 0x00000094'. Process P.exe (5616)

     

    Best Regards.

  5. Hi

     

    I write below code ,and check edits on login Form  isn't empty.

    procedure Tfgetsqlpass.UniButton1Click(Sender: TObject);
    begin
      if (edt_uname.Text ='' ) and  (edt_pword.Text = '') then
       Begin
        ModalResult := mrNone;
        ShowMessage('Please fill username and password!');
        Exit
       End;
    end;
    

    But after Button1Click application terminate.

     

     

    Best Regards.

     

  6. Hi

     

    I use below Code,for create UniPopupMenu in UniDbGrid in Runtime,But don't work.what's my error?

    procedure TMainForm.UniDBGrid1CellContextClick(Column: TUniDBGridColumn; X,Y: Integer);
    Var
      MyUniPopupMenu:TUniPopupMenu;
      i: SmallInt;
      MI: TuniMenuItem;
      AGrid:TUniDBGrid;
      Aagrid:TComponent;
    begin
      Aagrid:=Column.Grid;
      AGrid:=FindComponent(Aagrid.Name) as tunidbgrid;
      MyUniPopupMenu:=TUniPopupMenu.Create(AGrid);
      MyUniPopupMenu.Popup(X,Y);
      For i := 0 To 3 do
      Begin
        MI := TuniMenuItem.Create(AGrid);
        MI.Name := AGrid.Name + 'MI' + IntToStr(i);
        MI.Caption:='s'+IntToStr(i);
        MyUniPopupMenu.Items.Add(MI);
      End;
    end;
    

    Best Regards.

  7. Hi

     

    I have a UniForm and UniButton  on it for Insert,Edit or Delete data on UniDbGrid.

    I create three UniDbGrid A,B and C in runtime,that A is Master of B and C.

     

    Now my question is :

    How to can find, when UniButton clicked,cursor was on whom UniDbGrid A or B or C.

     

     

    In VCL, I find it by ActiveControl.

     

     

     

    Best Regards.

  8. Hi

     

    I write a testcase,In it I have a grid and filter the record,Then I select record  by filtering.

    But after clear filter,the selected record unchecked.

    How to i must solve it?

     

     

    Best Regards.

×
×
  • Create New...