* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
Beginners / Re: What wrong with this code?
« Last post by JLWest on Today at 09:03:49 pm »
you assigned the file twice..
the last one is the one it will be using which is the current directory or the root, windows does not
all you to write to the root that easy.

 It looks like I did assign twice but I comment one of them out when I compile.
I'll try your suggestion. I don't want to write to the root of c\:
2
Set the position field?

Anyway, here is my runtime instantiation, which is basically an evolved version of the grid in the "advanced" demo:

Code: Pascal  [Select]
  1.   b:=objtype.create; // self descriptive class for vsteditor module, based on TXMLConfig nodes.
  2.   for i:=0 to length(b.fielddescr)-1 do
  3.     begin
  4.       col:=actievst.header.Columns.Add;
  5.       col.Style:=vsOwnerDraw;
  6.       col.Options:=col.Options;
  7.       if invisible in b.fielddescr[i].properties then
  8.         col.Options:=col.Options-[covisible];
  9.       if b.fielddescr[i].fieldtype=vtboolean then
  10.        col.margin:=10
  11.       else
  12.        col.margin:=0;
  13.       if b.fielddescr[i].color=tcolor(0) then
  14.         col.Color:=globalcolor // colortest[i mod (high(colortest)+1)];
  15.       else
  16.         col.Color:=b.fielddescr[i].color;
  17.       col.position:=i+1;
  18.       col.width:=b.fielddescr[i].ColWidth;
  19.       col.Text := b.fielddescr[i].description;
  20.     end;
  21.   b.free;
  22.   ActieVST.Align:=alclient;
  23.   actievst.RootNodeCount:=numberitems;
  24.  
  25.   actievst.Invalidate;
  26.   actievst.Visible:=true;
3
edtDirectory is a TEdit (edt means edit). So remove the TListBox, add a TEdit and name it edtDirectory.

Not always but usually:
edt.... -> TEdit
cbx.... -> TCheckBox or TComboBox
btn.... -> TButton
lbl.... -> TLabel

I don't find a TEdit.
There is a TFileListbox and I tried it. Didn't work. It was under MISC.
Is this a new control maybe I don't have?
Under MISC there were a lot of controls that started with T.
4
Packages and Libraries / Re: Virtual TreeView add/delete columns at runtime
« Last post by JD on Today at 08:50:02 pm »
Hi there taazz,

I tried it but it still yields the same result. See screenshots

JD
5
Networking and Web Programming / Re: fpWEB HTMLDatasetFormGridProducer
« Last post by Leledumbo on Today at 08:46:39 pm »
Nobody who can explain how HTMLDatasetFormGridProducer works ?
You might want to contact Michael directly. I use fpWeb, but none of its droppable components, everything is purely handcoded in my case.
6
edtDirectory is a TEdit (edt means edit). So remove the TListBox, add a TEdit and name it edtDirectory.

Not always but usually:
edt.... -> TEdit
cbx.... -> TCheckBox or TComboBox
btn.... -> TButton
lbl.... -> TLabel
7
General / Re: Robotic arm in Lazarus
« Last post by krolikbest on Today at 08:23:05 pm »
The main aim is to build robotic arm basing on RPi. On RPi I code in Lazarus mostly, some parts write in Bascom for uC like AVRs. A little work ahead of me to build my own controller for hybrid-stepper (stepper with encoder) but some progress is already done :) Previously i've done it (reading encoders) directly on RPi with Lazarus but somehow it didn't work as expected (due second-hand encoders), but anyway uC for that is better and doesn't  load so much the RPi. Presently step by step i try to solve some basic brics and in 2 months I hope to start to conect all parts together :)
8
I now have it back to ASerge original
I have a named btnShowClick and CBXHidden.
I added a TListBox and named it edtDirectory.

It dosen't like the edtDirectory.Text (See the last two lines in Red)

procedure TForm1.btnShowClick(Sender: TObject);
     var
          ListOfFiles: TStringList;
          ListOfFolders: TStringList;
          Attributes: Integer;
          Message: string;

begin

      Attributes := faReadOnly;
      if cbxHidden.Checked then
        Attributes := Attributes or faHidden;
      ListOfFiles := TStringList.Create;
      try
        FileUtil.FindAllFiles(ListOfFiles, edtDirectory.Text, '*', False, Attributes);
        ListOfFiles.Insert(0, Format('The directory contains %d file(s).', [ListOfFiles.Count]));
        Message := ListOfFiles.Text;
      finally
        ListOfFiles.Free;
      end;
      if cbxHidden.Checked then
      begin
        ListOfFolders := TStringList.Create;
        try
          FileUtil.FindAllDirectories(ListOfFolders, edtDirectory.Text, False);
          ListOfFolders.Insert(0, Format('And %d folders(s).', [ListOfFolders.Count]));
          Message := Message + ListOfFolders.Text;
        finally
          ListOfFolders.Free;
        end;
      end;
      ShowMessage(Message)
end;
                                                                   


Compile Project, Target: project1.exe: Exit code 1, Errors: 2, Warnings: 1
unit1.pas(49,45) Warning: Symbol "faHidden" is not portable
unit1.pas(52,57) Error: identifier idents no member "Text"
unit1.pas(62,67) Error: identifier idents no member "Text"
9
We’re proud to announce Castle Game Engine 6.4 release! Castle Game Engine is a free, open-source game engine written in Object Pascal. We support both 3D and 2D games. We are cross-platform (desktop, Android, iOS — with the help of our own build tool and scalable user-interface components). The complete list of the engine features is here, so go ahead and download it and try!

New features in 6.4 release:


The above list was supposed to be only a summary :) For a really full list of new things see the news post.

Together with the new engine, we also release view3dscene 3.18.0 -- our 3D and 2D model browser, and glViewImage 1.8.0 -- our image browser. These tools are useful when working with the engine (to quickly check how does the engine handle given model or image), but are also perfectly useful on their own, to view or even post-process your files.

At this moment, I also want to ask you to support the engine development on Patreon. This support really helps me, and is very appreciated. Various 6.4 features (like physics integration!) would not happen without this.

If you have not yet seen my plans for 2018, read them here -- I have a plan that should make our engine the best engine ever :) In short: editor component (to get standalone editor, like Unity3d, and to get editing inside Lazarus/Delphi, like GLScene, and to get runtime inspection/editing of the game world), Delphi compatibility, glTF and PBR, and looking closely at WebAssembly and pas2js.
10
I have found that FBAdmin is just too buggy at the moment to use in my project and I have to start over with IBX.  The only thing that seems to be missing from IBX is an "in-memory" dataset like a TClientDataset in Delphi, or a TBufDataset in SQLdb.  Is there one?
Pages: [1] 2 3 ... 10

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus