Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: Is there a Lazarus whatsapp group
« Last post by wpkaka on Today at 09:17:39 am »
I've been wondering if there is a WhatsApp group with developers using and modifying Lazarus because I'm in a delphi group which helps alot. I'm trying to move away from delphi completely and would love to join a Lazarus whatsapp group for quick help and answers om questions. If there isn't one, can we maybe create one?

wow thanks for the whatsapp group. but more of the groups are full. do join my whatsapp group invite link
2
General / OLE connection issue
« Last post by daveinhull on Today at 06:32:53 am »
Hi,

I'm working with PowerPoint and I've got some code which copies a slide from one presentation and parts it into another. This works fine in VBA but in Pascal I often, but not always get an error message saying that the clipboard is empty. The paste command comes straight after the copy, but if I put a sleep 1500 in between, it's slow, but works.

I know from other languages and use of connections that I had to wait for the connection command to complete before going on to the next command and I'm thinking this might be the case here to.

Does anyone have any thoughts on this, and if it is likely to be this then how would I wait for the copy command to complete?

Many thanks
3
I didn't understand a lick he said! But his vid was of good quality, and his approach to planting DBLookupComboBoxes inside DBGrid cells is much cleaner than the tutorial on the same.
4
General / Passing arrays to PowerPoint routine
« Last post by daveinhull on Today at 05:04:37 am »
Hi,

Hope someone can help. I've trying to work with PowerPoint from Pascal and can get most of the things to work, but I have a problem when a PowerPoint routine needs an array. I'm just not sure how to do this in Pascal, e.g.

Code: Pascal  [Select]
  1. ReDim Preserve MyTitleArray(1 To nCounter)
  2.  
  3. Set rngTitleSlides = ActivePresentation.Slides.Range(MyTitleArray)

How would I setup and pass the MyTitleArray?

Thanks in advance
5
Hello Forum:

Following this tutorial, I've been able to use the DB components that come with Lazarus and placing a DBLookupComboBox inside a DBGrid has always worked seamlessly. But a few days ago, I switched to Rx DB components and the same tutorial code now fails. And since there are properties in the standard Lazarus DBLookupComboBox that aren't in the TRxDBLookupCombo, properties used in the tutorial, I've only been able to work with the TRxDBGrid and the Laz DBLookupComboBox. The TRxDBGrid is more robust than Lazarus' stock DBGrid, so I'd like to be able to use it.

What happens when I use the tutorial code with the TRxDBGrid is incredible. I have just one row (for testing) in the table that was to load in the grid. All looked okay. But as soon as I added the code for OnDrawColumnCell, my only row of data disappeared. Now I cld double click in the cells and the data wld highlight, my data magically appearing. But when I'd move to another cell, it'd disappear again.
Code: Pascal  [Select]
  1. procedure TForm_Main.DBGrid_AddItemsDrawColumnCell(Sender: TObject;
  2.   const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState);
  3. begin
  4.   if (gdFocused in State) then
  5.   begin
  6.     if (Column.Field.FieldName =  DBLookupComboBox_InventoryUnit.DataField) then
  7.     with DBLookupComboBox_InventoryUnit do
  8.     begin
  9.       Left := Rect.Left + DBGrid_AddItems.Left + 2;
  10.       Top := Rect.Top + DBGrid_AddItems.Top + 2;
  11.       Width := Rect.Right - Rect.Left;
  12.       Width := Rect.Right - Rect.Left;
  13.       Height := Rect.Bottom - Rect.Top;
  14.       Visible := True;
  15.     end;
  16.   end
  17. end;

I use several other of these TRxDBGrids, less the DBLookupComboBox, and they work like a DBGrid's suppose to. Even the Grid in question works, right up until I wire in the above-noted procedure. Then it all falls apart. Obviously I'm not smart enough to understand why that procedure works with Lazarus' stock TDBGrid and TDBLookupComboBox and craps out with the TRxDBGrid and a TDBLookupComboBox.

I hope someone can/will explain to me why my data's disappearing from the grid when i use that procedure? Thanks.

**************************************************************************************************************************************

Components in question are:
TRxDBGrid
TDBLookupComboBox
6
Beginners / Re: TPopupMenu bug?
« Last post by lucamar on Today at 03:18:22 am »
In case it interests you, I've made a little test in Linux (GTK2 widgetset) and they do nothing here either. The menu doesn't pop up on mouse hover, whatever the value of AutoPopup, and the items can be "clicked" with both left and right buttons whatever the value of TrackButton.
7
General / Re: The fastest integer type?
« Last post by VTwin on Today at 01:49:34 am »
I love this forum. Looking forward to the shootout.

It won't change my code though, I agree with wp.
8
General / Re: TTimer interval does not accept cardinal integer input
« Last post by Remy Lebeau on Today at 12:10:38 am »
I am quite sure Remy means to have a worker thread waiting for the kernel object, not block the main thread.

Correct.  Either a manual thread that uses WaitForSingleObject() (or WaitForMultipleObjects() so the thread can use a second object to wait on for termination requests), or an OS-managed thread from RegisterWaitForSingleObject().
9
General / Re: TTimer interval does not accept cardinal integer input
« Last post by jamie on Today at 12:06:37 am »
Why can't a simple TDateTime process be used? You can use one of the DaysBEtween etc.. functions
10
General / Re: The fastest integer type?
« Last post by BeniBela on September 20, 2019, 11:43:39 pm »
Not everyone has AVX btw

Till last week I have been using an i5-520M without any AVX
Pages: [1] 2 3 ... 10