Jump to content

lucksjb

Members
  • Posts

    21
  • Joined

  • Last visited

Posts posted by lucksjb

  1. This routine is with error

    a:= 1;

    b:= 1;

    // in this code 

      if a=b then begin

        showmessage( 'A = B',  // this message don´t showed 

            procedure(Res: Integer) begin

                   CLOSE

            end

        );

      end;

     

      showmessage('Just this message is showed ');

     

     

    I know this using the follow workaround :

    a:= 1;


    b:= 1;

     

    // in this code 

      if a=b then begin

        showmessage( 'A = B'); // this message is displayed

      end else begin

         showmessage('this message don´t showed ');

      end;

     


     

     

     

    How can I do it using callback ?

     

    tnx advanced

    Luciano 
  2. Hi, 

    I try to do a incremental search using onchange on a uniedit field. but if I typing fast, dont work. 

    how can I solve this ?

     

    Tnx advanced.

    Luciano 

     

     

    ///// FORM 

     

    object MainForm: TMainForm
      Left = 0
      Top = 0
      Caption = 'MainForm'
      ClientHeight = 495
      ClientWidth = 773
      Color = clBtnFace
      OldCreateOrder = False
      OnCreate = UniFormCreate
      MonitoredKeys.Keys = <>
      PixelsPerInch = 96
      TextHeight = 13
      object UniDBGrid1: TUniDBGrid
        Left = 0
        Top = 74
        Width = 769
        Height = 418
        Hint = ''
        DataSource = DataSource1
        Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgConfirmDelete, dgCancelOnExit, dgTitleClick, dgTitleHotTrack]
        WebOptions.LoadMaskMsg = 'Please wait...'
        OnAjaxEvent = UniDBGrid1AjaxEvent
        StripeRows = False
        TabOrder = 0
      end
      object UniEdit1: TUniEdit
        Left = 24
        Top = 46
        Width = 345
        Height = 22
        Hint = ''
        PasswordChar = #0
        CharCase = ecNormal
        MaxLength = 0
        CharEOL = #0
        Text = ''
        TabOrder = 1
        Color = clWindow
        OnChange = UniEdit1Change
        OnAjaxEvent = UniEdit1AjaxEvent
      end
      object ADOConnection1: TADOConnection
        Connected = True
        ConnectionString = 
          'Provider=SQLOLEDB.1;Password=xxxx;Persist Security Info=True' +
          ';User ID=sa;Initial Catalog=l_dep_brasil;Data Source=192.168.0.1' +
          '60'
        LoginPrompt = False
        Provider = 'SQLOLEDB.1'
        Left = 720
        Top = 8
      end
      object ADOQuery1: TADOQuery
        Connection = ADOConnection1
        CursorType = ctStatic
        Parameters = <>
        SQL.Strings = (
          'Select Codigo_cli, Nome_cli from clientes_tb ')
        Left = 624
      end
      object DataSource1: TDataSource
        DataSet = ADOQuery1
        Left = 528
      end
    end
     
     
     
    ///// UNIT 
     
    unit Main;
     
    interface
     
    uses
      Windows, Messages, SysUtils, Variants, Classes, Graphics,
      Controls, Forms, Dialogs, uniGUITypes, uniGUIAbstractClasses,
      uniGUIClasses, uniGUIForm, uniGUIBaseClasses, uniButton, uniEdit, Data.DB,
      uniBasicGrid, uniDBGrid, Data.Win.ADODB;
     
    type
      TMainForm = class(TUniForm)
        ADOConnection1: TADOConnection;
        ADOQuery1: TADOQuery;
        UniDBGrid1: TUniDBGrid;
        DataSource1: TDataSource;
        UniEdit1: TUniEdit;
        procedure UniEdit1Change(Sender: TObject);
        procedure UniFormCreate(Sender: TObject);
        procedure UniEdit1AjaxEvent(Sender: TComponent; EventName: string;
          Params: TStrings);
        procedure UniDBGrid1AjaxEvent(Sender: TComponent; EventName: string;
          Params: TStrings);
      private
        { Private declarations }
      public
        { Public declarations }
      end;
     
    function MainForm: TMainForm;
     
    implementation
     
    {$R *.dfm}
     
    uses
      uniGUIVars, MainModule, uniGUIApplication;
     
    function MainForm: TMainForm;
    begin
      Result := TMainForm(UniMainModule.GetFormInstance(TMainForm));
    end;
     
    procedure TMainForm.UniDBGrid1AjaxEvent(Sender: TComponent; EventName: string;
      Params: TStrings);
    begin
          UniEdit1.SetFocus;
    end;
     
    procedure TMainForm.UniEdit1AjaxEvent(Sender: TComponent; EventName: string;
      Params: TStrings);
    begin
         UniEdit1.SetFocus;
    end;
     
    procedure TMainForm.UniEdit1Change(Sender: TObject);
    begin
        ADOQuery1.Locate('Nome_cli',UniEdit1.Text,[loPartialKey]);
    end;
     
    procedure TMainForm.UniFormCreate(Sender: TObject);
    begin
        ADOQuery1.Open;
    end;
     
    initialization
      RegisterMainFormClass(TMainForm);
     
    end.
     
     
     
     
  3. Hi 

    my name is Luciano, I´m from Brazil,  and I begining develop using uniGUI.

     

    First of all congratulations by this excelent tool ... this is realy good tool...

    that´s a dream... 

     

     

    I don´t know understand how work callback functions ... 

     

    I need a running sample of callback function to a login form 

     

     

    tnx a lot guys 

     

     

    Luciano 

×
×
  • Create New...