Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-01

Small things

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luis R. Hilario B.

Hello,

Not Hints if Showmodal.

Error: Identifier not found TSTATICTEXT
Because it lacks StdCtrls in Uses.

How to test?
1- Create new project.
2- Put component (TSTATICTEXT).
3- Run.
---

Color functions, but only in the first window of the program.

How to test?
1- Create new project (Form1).
2- Create new form (Form2).
3- Code to show form2 (can be a button in Form1).
4- Run.

Notes:
Doing clic in Maximizing - Restore, is possible to see the color by a fraction of second.
---

lazarus/examples/comdialogs
In this example the window appears with color (clteal), but later is not possible to change the color using the dialogue.

Mattias Gaertner
to Luis R. Hilario B.
Hello, Not Hints if Showmodal.

Added to my bug list.

Error: Identifier not found TSTATICTEXT Because it lacks StdCtrls in Uses.

fixed

Show quoted text 11 lines
Color functions, but only in the first window of the program. How to test? 1- Create new project (Form1). 2- Create new form (Form2). 3- Code to show form2 (can be a button in Form1). 4- Run. Notes: Doing clic in Maximizing - Restore, is possible to see the color by a fraction of second.

Added.

Show quoted text 5 lines
--- lazarus/examples/comdialogs In this example the window appears with color (clteal), but later is not possible to change the color using the dialogue.

Dito.

Mattias

Luis R. Hilario B.
to Luis R. Hilario B.: Not Hints if Showmodal. Error: Identifier not found TSTATICTEXT Because it lacks StdCtrls…
Mattias Gaertner wrote 14 lines
On Thu, 16 Jan 2003 07:29:05 -0400 "Luis R. Hilario B." wrote: >lazarus/examples/comdialogs >In this example the window appears with color (clteal), but later is not >possible to change the color using the dialogue. > > Dito.

Two days later appeared the messages.
What is "Dito"?

More upon colors.
------------------------
Playing with TStringGrid.
Editing column 1, row 1 is not possible until doing click first in another cell.

After a while (mysterious) Form2 has color. Upon eliminating TStringGrid the color is lost also.

TstringGrid has something that active the color, but after several compilations and something of time.

To see example.

program funciona;
{$mode objfpc}{$H+}

uses
Interfaces,

  Forms, unit1, unit2;
begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm2, Form2);
  Application.Run;
end.

object Form1: TForm1
BORDERSTYLE = bsdialog
CAPTION = 'Form1'
COLOR = 255
CLIENTHEIGHT = 300
CLIENTWIDTH = 400
POSITION = poscreencenter
SHOWHINT = True
WINDOWSTATE = wsmaximized
HORZSCROLLBAR.PAGE = 401
VERTSCROLLBAR.PAGE = 301
LEFT = 297
HEIGHT = 300
HINT = 'vgdf'
TOP = 175
WIDTH = 400
object Button1: TBUTTON
ANCHORS = [aktop, akleft]
CAPTION = 'ShowForm2'
TABSTOP = True
ONCLICK = Button1CLICK
LEFT = 144
HEIGHT = 25
TOP = 8
WIDTH = 75

  end

end

unit unit1;
{$mode objfpc}{$H+}
interface

uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, LResources, Buttons,

  StdCtrls, ExtCtrls, Grids, unit2;
type
  TForm1 = class(TForm)
    Button1: TBUTTON;
    procedure Button1CLICK(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;
var
  Form1: TForm1;
implementation

{ TForm1 }

procedure TForm1.Button1CLICK(Sender: TObject);
begin
  form2.Show;
end;
initialization
  {$I unit1.lrs}
end.

object Form2: TForm2
CAPTION = 'Form2'
COLOR = 65535
CLIENTHEIGHT = 300
CLIENTWIDTH = 400
SHOWHINT = True
ONCREATE = Form2CREATE
HORZSCROLLBAR.PAGE = 401
VERTSCROLLBAR.PAGE = 301
LEFT = 312
HEIGHT = 300
HINT = 'ghgh'
TOP = 236
WIDTH = 400
object Stringgrid1: TSTRINGGRID
ANCHORS = [aktop, akleft]
AUTOADVANCE = aadown
COLOR = 65280
COLCOUNT = 5
DEFAULTCOLWIDTH = 64
DEFAULTROWHEIGHT = 24
DEFAULTDRAWING = False
FIXEDCOLS = 1
ROWCOUNT = 5
FIXEDROWS = 1
FONT.COLOR = 255
FONT.HEIGHT = -14
FONT.NAME = 'beast wars'
FONT.STYLE = [fsbold]
GRIDLINEWIDTH = 0
OPTIONS = [gofixedvertline, gofixedhorzline, govertline, gohorzline, gorangeselect, gorowsizing, gocolsizing, goediting, goalwaysshoweditor, gosmoothscroll] VISIBLECOLCOUNT = 5
VISIBLEROWCOUNT = 5
ONBEFORESELECTION = Stringgrid1BEFORESELECTION
HORZSCROLLBAR.PAGE = 323
HORZSCROLLBAR.RANGE = 322
VERTSCROLLBAR.PAGE = 123
VERTSCROLLBAR.RANGE = 122
HEIGHT = 140
WIDTH = 340

  end

end

unit unit2;
{$mode objfpc}{$H+}
interface

uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, LResources, ComCtrls,

  Grids, StdCtrls;
type
  TForm2 = class(TForm)
    Stringgrid1: TSTRINGGRID;
    procedure Form2CREATE(Sender: TObject);
    procedure Stringgrid1BEFORESELECTION(Sender: TObject; Col, Row: Integer;
          var CanChange: Boolean);
  private
    { private declarations }
  public
    { public declarations }
  end;
var
  Form2: TForm2;
implementation

{ TForm2 }

procedure TForm2.Form2CREATE(Sender: TObject);
begin
Stringgrid1.RowColor[2] := clYellow;
Stringgrid1.RowColor[4] := clYellow;
Stringgrid1.Cells[1,0] := '1';
Stringgrid1.Cells[2,0] := '2';
end;
procedure TForm2.Stringgrid1BEFORESELECTION(Sender: TObject; Col, Row: Integer;
  var CanChange: Boolean);
var
  Iteme:TListItem;
begin
if col = 3 then canchange :=false;
end;
initialization
  {$I unit2.lrs}
end.