Showing posts with label UniGui. Show all posts
Showing posts with label UniGui. Show all posts

Wednesday, 25 August 2021

Unigui Global Variable

 Here the sample how to use global variables for other forms.


DataModule : dmDataModule

 public

    { Public declarations }      

    fMyGlobalVar_Userid    : string;

   

published

    property MyGlobalVar_Userid: string read fMyGlobalVar_Userid write                                 fMyGlobalVar_Userid;

  end;




Form1 : 

var 

   UserId : string;

begin

   dmDataModule.MyGlobalVar_Userid := UserId;

end;




Form2 : 

   unimLabel1.Text := dmAppModule.MyGlobalVar_Userid;



Friday, 20 August 2021

Unigui How to Setting Enter As Tab

 You must configure your form and enable Enter using these steps:


In Property of UniForm, 

    NavigateKeys --> Enabled = True

                           --> Next --> Key = 13

                                         -->  HandleBrower = True


Friday, 11 June 2021

UniGUI TUniDBGrid Color Cell Column or Row

Contoh nak kasi warna data dalam grid UniGUI. Sedap mata memandang. 

Bila angka pula bermacam-macam, sakit mata dibuatnya.

Boleh pilih nak warnakan untuk row atau  column. Ikut keperluan. 


procedure TfraView.UniDBGrid1DrawColumnCell(Sender: TObject; ACol,

  ARow: Integer; Column: TUniDBGridColumn; Attribs: TUniCellAttribs);

begin

  // Attribs.Color:=clGreen; //background color

 // Attribs.Font.Style:=[fsbold];

 // Attribs.Style.Padding := '5px';


 // color for column only

  if Column.FieldName = 'E_GROUP' then

  begin

     if Column.Field.AsString = '03' then

        Attribs.Font.Color := clGreen

    else if Column.Field.AsString = '02' then

       Attribs.Font.Color := clBlue

   else if Column.Field.AsString = '07' then

      Attribs.Font.Color := clPurple

   else

      Attribs.Font.Color := clMaroon;

  end;


  // color for row

  if (qryTermVA_ID.AsString = 'MB') then

     Attribs.Font.Color:=clBlue

  else if (qryTermVA_ID.AsString = 'PB') then

     Attribs.Font.Color:=clPurple

  else if (qryTermVA_ID.AsString = 'AM') then

     Attribs.Font.Color:=clGreen

  else

     Attribs.Font.Color:=clMaroon;

end;

Friday, 12 June 2020

UniGui Mobile - Error O1C is not defined dan c is not a constructor

Bila component UniGui Mobile tesilap guna, sepatutnya guna  TUnimButton tetapi guna TUniButton.
Error O1C is not defined dan c is not a constructor akan dipaparkan seperti di bawah semasa run. 


c is not a constructor

O1C is not defined