* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
LCL / Re: TMainMenu Ownerdraw - How to paint the background?
« Last post by knuckles on Today at 12:35:15 pm »
So for the sake of it I added a little extra basic code but in the end I think I will abandon this, not only is painting the actual background proving difficult to impossible I also see no obvious way to draw the menu captions back.

Code: Pascal  [Select]
  1. procedure TForm1.MainMenu1DrawItem(Sender: TObject; ACanvas: TCanvas;
  2.   ARect: TRect; AState: TOwnerDrawState);
  3. begin
  4.   ACanvas.GradientFill(ARect, clSilver, clWhite, gdVertical);
  5.  
  6.   if (odSelected in AState) then
  7.   begin
  8.     ACanvas.Brush.Color := $00F3DBBC;
  9.     ACanvas.Pen.Color := $00EBB983;
  10.     ACanvas.Rectangle(ARect);
  11.   end;
  12.  
  13.   ACanvas.TextOut(ARect.Left + 3, ARect.Top + 3, 'test');
  14. end;  

So I guess what I need is a 3rd party menu and Toolbar I guess but I don't seem able to find any, something like toolbar97 or SXSkinComponents I think it was called which allowed OfficeXP menu and toolbar themes etc would have been a good test.
2
General / Re: need help with calender
« Last post by rhong7 on Today at 12:11:47 pm »
Thank you so much for helping me and other people on this website. i really respect you

can you help me with one more thing?

so i added edit button to put number in the label to show that how much progress is done in the goal.
For example the goal is 10 and if i put 5 in the Tedit and press the button, the label will show 5 and i coded and info.progress will be 5.

but when i press the button, new item is added in the listbox on that day. It has the same name but if you double click it it has the previous info.progress.(btw you have to click other day and click the day again to see the new added item with the same name)

please find the attachment
3
Databases / DBF Packtable
« Last post by MVD on Today at 12:07:47 pm »
Hi,
I have a program that is working very well, I have only one problem.
I am working with DBASE VII tables ( I know, is old  and there are more modern databases but I am confortable with it because I was programming in Delphi6 long time ago) and the table is open Shared.(So we can use the program with 2 or more users). I have a menu item to clean up the database. Regenerating indexes is no problem but when I try to pack the table with ".packtable" I have a problem. To pack the table I have to set the exclusive propertie, If a set:
Code: Pascal  [Select]
  1. [color=red]  hoofdvenster.Dbf1.Exclusive:=true;
  2.    hoofdvenster.Dbf1.PackTable; [/color]
I got the message : "Exclusive access is required for this operation"
If I set:
   
Code: Pascal  [Select]
  1. [color=red]hoofdvenster.Dbf1.close;
  2.    hoofdvenster.Dbf1.Exclusive:=true;
  3.    hoofdvenster.Dbf1.open:=true  ;
  4.    hoofdvenster.Dbf1.PackTable; [/color]
I got the message : "unable to open file "C:\x.dbf"
??????
4
Windows / Re: Using C# DLL in Lazarus
« Last post by tudi_x on Today at 11:30:25 am »
@avra - the deletion of posts does not seem to work. maybe he opened a new one due to code not inserted as recommended in the first place.

@rambo - i think you need to have a handler for the dll and define the external function, something like
Code: Pascal  [Select]
  1. TGetDeviceInfo = function(AIndex: integer): PTDeviceInfoRecord; cdecl;

after you define the handler and the function you can use it.
5
Windows / Re: Using C# DLL in Lazarus
« Last post by avra on Today at 11:11:38 am »
Next time you cross post I will hold my comments...  >:(
Please do not cross post in the future.  ;D
6
Packages and Libraries / Re: Using C# DLL in Lazarus
« Last post by avra on Today at 11:09:28 am »
Just several days ago I went a little different path. I used regasm tool from .net framework to register .net assembly as a COM object, which I later imported into Delphi and used. I did not have a need to try the same with Lazarus, but last time I checked COM and ActiveX support have advanced a lot so that should be doable too.
7
Android / Re: LAMW App Crashes on Start up
« Last post by CC on Today at 11:02:07 am »
Thanks for the clarification.
8
Databases / Re: How to save DBGrid data to CSV Text file or Clipboard
« Last post by Gizmo on Today at 10:58:26 am »
Taaz....thank you so much for your amazing response. I tried your solution last night and it worked perfectly, first time. It's frankly amazing how you and others like you cobble these things together with a blink of an eye.

Thank you. SOLVED.
9
Databases / Re: How to save DBGrid data to CSV Text file or Clipboard
« Last post by Gizmo on Today at 10:49:39 am »
Quote
This question demonstrates perfectly a misunderstanding common to database novices

I'm familiar with how databases work. I also get that a database and a component are seperate. I am, however, unfamiliar with coding (programmatically) database integration with visual elements. My users need the ability to save what they see in the DBGrid in a human useable form - a CSV, and XLS, a PDF, whatever. Not a raw SQLIte database. They also need to be able to just click it and have it or part of it copied to a clipboard.

Which answers your next point :
Quote
is there a good reason why Gizmo can't/shouldn't use one of the CSV DataSets available in Lazarus
Quote
Copying such data to the Clipboard should be trivial.

Yes. Because I already am, but they don't scale to enterprise level for millions of files which is what I keep being asked by users. My program currently does utilise StringGrids and users can currently save to CSV and copy to clipboard. For a few thousand files, its fine (sg.savetoCSVfile and clipboard.astext := sg). But it has matured beyond that. I m merely asking for help with replicating that existing behaviour now I am moving the program to SQLite technology. My original question does in fact allude to this.
10
General / Re: need help with calender
« Last post by rvk on Today at 10:30:38 am »
are you a lazarus teacher or something?
Well, I am on this forum (kind of) :D

No, I like to help around on the forum and have a lot of experience in Delphi and Lazarus.
I use Delphi for developing software for my clients and use Lazarus in my free time.

I began learning Turbo Pascal back in the late 80s so everything is kinda self-learned but with time comes experience :)
(Google helps a lot too  8) )
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