Re: [Lazarus] TStringGrid - ColResize on FixedCols (or Freeze Pane on ordinary columns)

2011-07-01 Thread Graeme Geldenhuys
On 06/30/2011 08:10 PM, Alexsander Rosa wrote:
 TStringGrid - ColResize on FixedCols (or Freeze Pane on ordinary columns).

Can you explain more of what freeze pane does? Any links or
screenshots of other grid components that support this feature?



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] barchart demo...

2011-07-01 Thread zeljko
On Thursday 30 of June 2011 17:06:55 waldo kitty wrote:
 win2k i386
 Laz 0.9.31 SVN r31426
 FPC 2.4.5 SVN runknown
 
 when i attempt to run laz/examples/barchart/chartdemo.lpi i'm told that it
 cannot find the chart unit specified in the uses clause... am i missing a
 required package installed to my ide or is something else amiss?

That's because unit Chart is renamed to BarChart. I've fixed that ... see 
r31484.

zeljko

 
 
 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] barchart demo...

2011-07-01 Thread Felipe Monteiro de Carvalho
On Thu, Jun 30, 2011 at 5:08 PM, Alexander Klenin kle...@gmail.com wrote:
 TBarChart is deprecated, please use TAChart instead.
 (BTW, maybe it is time to remove the example, or at least mark it in some 
 way?)

I'm in favor of a complete removal of TBarChart. Or moving it to
lazarus-ccr if anyone still uses it.

On the other hand I think that this was already proposed some time ago
and someone was against it, I don't remember who.

-- 
Felipe Monteiro de Carvalho

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Error while compiling latest SVN version

2011-07-01 Thread Bart
B.t.w. The new definition of TWindowState breaks compatibility with Delphi VCL.
See: http://docwiki.embarcadero.com/VCL/en/Forms.TWindowState

Does anyone mind?

Bart

On 6/30/11, Dirk dirk.l...@dirksweb.com wrote:
From: zeljko [mailto:zel...@holobit.net]
Sent: Thursday, June 30, 2011 2:56 PM
To: Lazarus mailing list
Subject: Re: [Lazarus] Error while compiling latest SVN version

On Thursday 30 of June 2011 15:10:08 Dirk wrote:
 Submitted bug report + patch for Anchordocking:
 http://bugs.freepascal.org/view.php?id=19660

I've applied your patch.


 Thanks zeljko. I closed the bug report.

 Dirk.



 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Codetools confused?

2011-07-01 Thread Bart
Done: http://bugs.freepascal.org/view.php?id=19663

Bart

On 6/30/11, Mattias Gaertner nc-gaert...@netcologne.de wrote:



  Bart bartjun...@gmail.com hat am 30. Juni 2011 um 16:29 geschrieben:

   On 3/27/11, Bart bartjun...@gmail.com wrote:
On 3/27/11, Mattias Gaertner nc-gaert...@netcologne.de wrote:
ATM I cannot reproduce the popup after a dot in a text constant, I'll
make another screenshot when it happens again (and I rember to do
 so).
  
   Codetools still pop up when I type a period in a string constant (but
   only (it seems) if the string constant is already enclosed in single
   quotes).
  
   See attached image.
  
   Lazarus r31473M/fpc 2.4.4

  Please create a bug report.
 Mattias


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE flaws

2011-07-01 Thread Martin

On 01/07/2011 03:49, Hans-Peter Diettrich wrote:

Currently I observe the following flaws (Win7):

1) An editor page in a secondary editor window *only* can be cloned 
into a new window. Why does the handling of secondary editor windows 
differ from the handling of the primary window???

It shouldn't be different. Please report as a bug

You should still be able to drag/drop it back to the original window, 
holding CTRL for copy/clone




2) Code completion still gets stuck all the time. The list is either 
blanked, or contains only Bad... entries.


3) Possibly related to secondary editor windows: a code template 
invocation (^J) can end up in a different window (previously active?). 
In most cases it helps to switch to an different tab/file in the 
originating window, and back again.


Would be good if reproducible.

Is that an IDE without docking, with docking (which)? Or does it happen 
independent of docking


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE flaws

2011-07-01 Thread Martin

On 01/07/2011 12:47, Martin wrote:

On 01/07/2011 03:49, Hans-Peter Diettrich wrote:

Currently I observe the following flaws (Win7):

1) An editor page in a secondary editor window *only* can be cloned 
into a new window. Why does the handling of secondary editor windows 
differ from the handling of the primary window???

It shouldn't be different. Please report as a bug

You should still be able to drag/drop it back to the original window, 
holding CTRL for copy/clone


Actually, I just checked on windows vista, and it works (2nd window 
allows cloning back to 1st window). I tested before, but tricked myself.


Please not when you test, that there is another restriction. Each unique 
file can only have one tab per window.


So if you cloned unit1 from window-1 to window-2, then it is open in 
both windows. This means you can not clone (not move) it to window-1 as 
it is already open there.


Martin

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Does using GtkFrame in LCL make sense?

2011-07-01 Thread Max Vlasov
Hi,

I recently created report http://bugs.freepascal.org/view.php?id=19658

This was about panels that behave a little differently to panels in Lazarus
Windows and Delphi. There were no comments or feedback request there so I
decided to take a look

After some investigation it appeared that the problem was because GtkFrame
was used. The problem with this widget is that one can't control the postion
and painting in a small area two pixels around it. So every nested TPanel in
GTK2 Lazarus smaller by 4 pixels that the parent no matter what (the
consequences can be seen in the screenshots from Panel.zip). Looking at the
code I also noticed that no special features of GtkFrame were used, all
panel drawings take place inside paltform-independent part of LCL.

Trying to solve the problem, I ended up with the following replacement in
the TGtk2WSCustomPanel.CreateHandle

{  Before }

  Frame := gtk_frame_new(nil);
  gtk_frame_set_shadow_type(PGtkFrame(Frame),
BorderStyleShadowMap[TCustomControl(AWinControl).BorderStyle]);

{  After }

  Frame:=gtk_scrolled_window_new(nil, nil);
  gtk_scrolled_window_set_shadow_type(PGtkScrolledWindow(Frame),
BorderStyleShadowMap[TCustomControl(AWinControl).BorderStyle]);
  gtk_scrolled_window_set_policy(PGtkScrolledWindow(Frame),
GTK_POLICY_NEVER, GTK_POLICY_NEVER);

After this change the problem project that looked identically (good) in
Delphi and Win32 Lazarus and differently in GTK2 Lazarus (labels and panels
at wrong positions) began to look consistent in linux.

So there are questions:
- Can this patch be applied? Apart from obvious testing and checking, there
is also a compatibility problem. After this change, the forms people
designed in linux can start to look a little different (or even greatly if
the nesting level of panels is deep). But as I noted in the report, without
this change it's difficult to synchronize forms visually.
- Does using GtkFrame in LCL make sense at all? I did not look deeper, but
at least quick search showed it was used several times.

Thanks,

Max Vlasov
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TStringGrid - ColResize on FixedCols (or Freeze Pane on ordinary columns)

2011-07-01 Thread Alexsander Rosa
Freeze pane is an expression from Excel spreadsheet: you freeze a few
columns (usually with identification data) and scroll the rest. In
TStringGrid it's done with FixedCols: they remain fixed (frozen) and the
rest of the columns can be scrolled. This part is fine, the freeze pane
feature is there. However, in TStringGrid the fixed columns can't be
manually resized even when you set goColumnResize to true. I wish there were
an option like goFixedColsResize or something.

2011/7/1 Graeme Geldenhuys graemeg.li...@gmail.com

 On 06/30/2011 08:10 PM, Alexsander Rosa wrote:
  TStringGrid - ColResize on FixedCols (or Freeze Pane on ordinary
 columns).

 Can you explain more of what freeze pane does? Any links or
 screenshots of other grid components that support this feature?



 Regards,
  - Graeme -



-- 
Atenciosamente,
Alexsander da Rosa
http://rednaxel.com
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Does using GtkFrame in LCL make sense?

2011-07-01 Thread zeljko
On Friday 01 of July 2011 14:17:15 Max Vlasov wrote:
 Hi,
 
 I recently created report http://bugs.freepascal.org/view.php?id=19658
 
 This was about panels that behave a little differently to panels in Lazarus
 Windows and Delphi. There were no comments or feedback request there so I
 decided to take a look
 
 After some investigation it appeared that the problem was because GtkFrame
 was used. The problem with this widget is that one can't control the
 postion and painting in a small area two pixels around it. So every nested
 TPanel in GTK2 Lazarus smaller by 4 pixels that the parent no matter what
 (the consequences can be seen in the screenshots from Panel.zip). Looking
 at the code I also noticed that no special features of GtkFrame were used,
 all panel drawings take place inside paltform-independent part of LCL.
 
 Trying to solve the problem, I ended up with the following replacement in
 the TGtk2WSCustomPanel.CreateHandle
 
 {  Before }
 
   Frame := gtk_frame_new(nil);
   gtk_frame_set_shadow_type(PGtkFrame(Frame),
 BorderStyleShadowMap[TCustomControl(AWinControl).BorderStyle]);
 
 {  After }
 
   Frame:=gtk_scrolled_window_new(nil, nil);
   gtk_scrolled_window_set_shadow_type(PGtkScrolledWindow(Frame),
 BorderStyleShadowMap[TCustomControl(AWinControl).BorderStyle]);
   gtk_scrolled_window_set_policy(PGtkScrolledWindow(Frame),
 GTK_POLICY_NEVER, GTK_POLICY_NEVER);
 
 After this change the problem project that looked identically (good) in
 Delphi and Win32 Lazarus and differently in GTK2 Lazarus (labels and panels
 at wrong positions) began to look consistent in linux.
 
 So there are questions:
 - Can this patch be applied? Apart from obvious testing and checking, there
 is also a compatibility problem. After this change, the forms people
 designed in linux can start to look a little different (or even greatly if
 the nesting level of panels is deep). But as I noted in the report, without
 this change it's difficult to synchronize forms visually.
 - Does using GtkFrame in LCL make sense at all? I did not look deeper, but
 at least quick search showed it was used several times.

1.It's changed to GtkFrame with r31280
LCL GTK2: Make Panel.OnPaint work. Patch from August Klein, issue #19488

I don't like to use GtkScrolledWin in place of simple widget. Can it be 
changed to something else (like pure GtkWindow and then draw border if needed) 
?



zeljko
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Ctrl + Space Window Source lazarus

2011-07-01 Thread Marcelo Silva (IG)
Guys, excuse my English, really do not speak English, I'm using Google:)

First thanks for this list!

I do not know the name of that little window that opens when you press Ctrl + 
Space lazarus.
But I know I know what I mean.
In Delphi Right clicking it gives you the option to sort by name or scope,
this way is easier to find a particular property or function.
 
I looked in the options settings, but could not identify anything that refers 
to it.
 
Is to configure it?

If not, are there plans to put this option?

Thank you and congratulations to the staff of Lazarus!
 
 
Marcelo Silva
--
msn: marc...@ig.com.br
SP - brasil--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Ctrl + Space Window Source lazarus

2011-07-01 Thread Marcelo Silva (IG)
Thank you, Martin
Well, since there is no such option, keep this email as a suggestion to the 
developers of Lazarus.


Marcelo Silva
--
msn: marc...@ig.com.br
SP – brasil


From: Martin 
Sent: Friday, July 01, 2011 10:08 AM
To: Marcelo Silva (IG) ; Lazarus mailing list 
Subject: Re: [Lazarus] Ctrl + Space Window Source lazarus

code completion window/popup

No there is no option yet, to sort it.

I don't know if/what plans there are.

On 01/07/2011 14:05, Marcelo Silva (IG) wrote: 
  Guys, excuse my English, really do not speak English, I'm using Google:)

  First thanks for this list!

  I do not know the name of that little window that opens when you press Ctrl + 
Space lazarus.
  But I know I know what I mean.
  In Delphi Right clicking it gives you the option to sort by name or scope,
  this way is easier to find a particular property or function.
   
  I looked in the options settings, but could not identify anything that refers 
to it.
   
  Is to configure it?

  If not, are there plans to put this option?

  Thank you and congratulations to the staff of Lazarus!
   
   
  Marcelo Silva
  --
  msn: marc...@ig.com.br
  SP - brasil

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Does using GtkFrame in LCL make sense?

2011-07-01 Thread Max Vlasov
2011/7/1 zeljko zel...@holobit.net

 On Friday 01 of July 2011 14:17:15 Max Vlasov wrote:

  Hi,

 

  I recently created report http://bugs.freepascal.org/view.php?id=19658

 

  This was about panels that behave a little differently to panels in Lazarus

  Windows and Delphi. There were no comments or feedback request there so I

  decided to take a look

 1.It's changed to GtkFrame with r31280

 LCL GTK2: Make Panel.OnPaint work. Patch from August Klein, issue #19488

Good news it was just half month ago, I see the post by August Klein (reporter)

| 2011-06-14 03:36
| I upload my proposed patch for this bug. It consists in rewriting of
GTK2 Panel
| component. Now it
| uses a Frame (as Qt) instead of ScrolledWindow.
| It also fixes 0017662 and 0017775.

So at least not so many forms will be affected if the positioning is changing.
The bad news is that three problems were fixed by moving from
ScrollingWindow to Frame, now I suggest to fix another one by
returning, not so much on my side  :)
By the way, I tried to catch OnPaint for current (frame) control and
failed, it did not fire.


 I don't like to use GtkScrolledWin in place of simple widget. Can it be 
 changed to something else (like pure GtkWindow and then draw border if 
 needed) ?


I tried, but even access violation appeared, seems like GtkWindow is
not intended to be used as a child

Hmm, the situation is still very complex...

Max

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Does using GtkFrame in LCL make sense?

2011-07-01 Thread Henry Vermaak

On 01/07/11 13:17, Max Vlasov wrote:

Trying to solve the problem, I ended up with the following replacement
in the TGtk2WSCustomPanel.CreateHandle

{  Before }

   Frame := gtk_frame_new(nil);
   gtk_frame_set_shadow_type(PGtkFrame(Frame),
 BorderStyleShadowMap[TCustomControl(AWinControl).BorderStyle]);


gtk_container_set_border_width(PGtkContainer(Frame), 0) here seems to 
make it better.


Henry

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Does using GtkFrame in LCL make sense?

2011-07-01 Thread Henry Vermaak

On 01/07/11 14:44, Henry Vermaak wrote:

On 01/07/11 13:17, Max Vlasov wrote:

Trying to solve the problem, I ended up with the following replacement
in the TGtk2WSCustomPanel.CreateHandle

{  Before }

Frame := gtk_frame_new(nil);
gtk_frame_set_shadow_type(PGtkFrame(Frame),
BorderStyleShadowMap[TCustomControl(AWinControl).BorderStyle]);


gtk_container_set_border_width(PGtkContainer(Frame), 0) here seems to
make it better.


Actually, it doesn't make a difference.  The thing that fooled me is 
that my panels on debian are bigger than yours on ubuntu.


Henry

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Does using GtkFrame in LCL make sense?

2011-07-01 Thread Henry Vermaak

On 01/07/11 15:09, Henry Vermaak wrote:

On 01/07/11 14:44, Henry Vermaak wrote:

On 01/07/11 13:17, Max Vlasov wrote:

Trying to solve the problem, I ended up with the following replacement
in the TGtk2WSCustomPanel.CreateHandle

{  Before }

Frame := gtk_frame_new(nil);
gtk_frame_set_shadow_type(PGtkFrame(Frame),
BorderStyleShadowMap[TCustomControl(AWinControl).BorderStyle]);


gtk_container_set_border_width(PGtkContainer(Frame), 0) here seems to
make it better.


Actually, it doesn't make a difference. The thing that fooled me is that
my panels on debian are bigger than yours on ubuntu.


That said, changing the frame to gtk_alignment_new(0, 0, 1, 1) seems to 
work for me.  What does it look like on Ubuntu?


Henry

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Does using GtkFrame in LCL make sense?

2011-07-01 Thread Max Vlasov
On Fri, Jul 1, 2011 at 6:17 PM, Henry Vermaak henry.verm...@gmail.com wrote:
 On 01/07/11 15:09, Henry Vermaak wrote:

 On 01/07/11 14:44, Henry Vermaak wrote:

 On 01/07/11 13:17, Max Vlasov wrote:

 Trying to solve the problem, I ended up with the following replacement
 in the TGtk2WSCustomPanel.CreateHandle

 {  Before }

 Frame := gtk_frame_new(nil);
 gtk_frame_set_shadow_type(PGtkFrame(Frame),
 BorderStyleShadowMap[TCustomControl(AWinControl).BorderStyle]);

 gtk_container_set_border_width(PGtkContainer(Frame), 0) here seems to
 make it better.

 Actually, it doesn't make a difference. The thing that fooled me is that
 my panels on debian are bigger than yours on ubuntu.

 That said, changing the frame to gtk_alignment_new(0, 0, 1, 1) seems to work
 for me.  What does it look like on Ubuntu?


Henry, works correctly in Ubuntu, looks like a good candidate. At
least it hasn't bad history of the scrolling control so maybe also
fixes the same problems. But I still can not catch OnPaint from all 3
variants (Frame, Scrolling, Alignment) bevel-less or not. So I don't
understand what was that fix (#19488) about.

Max

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Does using GtkFrame in LCL make sense?

2011-07-01 Thread zeljko
On Friday 01 of July 2011 15:44:13 Henry Vermaak wrote:
 On 01/07/11 13:17, Max Vlasov wrote:
  Trying to solve the problem, I ended up with the following replacement
  in the TGtk2WSCustomPanel.CreateHandle
  
  {  Before }
  
 Frame := gtk_frame_new(nil);
 gtk_frame_set_shadow_type(PGtkFrame(Frame),
 
   BorderStyleShadowMap[TCustomControl(AWinControl).BorderStyle]);
 
 gtk_container_set_border_width(PGtkContainer(Frame), 0) here seems to
 make it better.

Thanks Henry, I haven't time to search if border can be setted up under gtk, 
but this can help.
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE flaws

2011-07-01 Thread Hans-Peter Diettrich

Martin schrieb:

On 01/07/2011 03:49, Hans-Peter Diettrich wrote:

Currently I observe the following flaws (Win7):

1) An editor page in a secondary editor window *only* can be cloned 
into a new window. Why does the handling of secondary editor windows 
differ from the handling of the primary window???

It shouldn't be different. Please report as a bug


Okay.

Ah, it looks as if a secondary editor window wrongly *thinks* that it is 
the only editor window, and constructs the popup menu accordingly. The 
menu of the primary editor correctly reflects other editors.



You should still be able to drag/drop it back to the original window, 
holding CTRL for copy/clone


No target responds to dragging, regardless of CTRL :-(

BTW, CTRL is the wrong modifier, it's intended to *ignore* all possible 
targets.


But the DragManager is broken since a long time, and nobody cares about 
according bug reports :-(



2) Code completion still gets stuck all the time. The list is either 
blanked, or contains only Bad... entries.


This one possibly has been fixed, cannot reproduce such errors after SVN 
update?



3) Possibly related to secondary editor windows: a code template 
invocation (^J) can end up in a different window (previously active?). 
In most cases it helps to switch to an different tab/file in the 
originating window, and back again.


Would be good if reproducible.


Cannot reproduce after SVN update :-)

Is that an IDE without docking, with docking (which)? Or does it happen 
independent of docking


Seems unrelated to docking.

DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE flaws

2011-07-01 Thread Hans-Peter Diettrich

Martin schrieb:

Actually, I just checked on windows vista, and it works (2nd window 
allows cloning back to 1st window). I tested before, but tricked myself.


Oops, *this* seems to be the reason!

Please not when you test, that there is another restriction. Each unique 
file can only have one tab per window.


That's okay, but the IDE breaks even this rule :-(

When a project is loaded, and problems in the resources (.lfm) are 
found, this file is opened *twice* in the same window. When this 
happens, it's highly recommended to create a new project and cancel 
updates of the old project - everything else will lead to strange 
errors, up to making the IDE unresponsive :-(


So if you cloned unit1 from window-1 to window-2, then it is open in 
both windows. This means you can not clone (not move) it to window-1 as 
it is already open there.


That's okay so far but, as you see, it can lead to confusion. I've just 
added another (lengthy) note to issue 19666, that explains what I 
consider *desired* behaviour instead:


The Clone menu should allow to simply *activate* an already existing 
*or* newly created clone. Currently it can be very time consuming to 
scroll through the tabs of the target window, shifting one by one, until 
an already existing clone is found there.
I already suggested an pagewise scroll through the tabs, instead of 
shifting one by one, but this idea was rejected a long time ago...


Related issue: can the entries in the Window menu be sorted 
alphabetically, so that it will be easier to find and activate a page by 
name?



Of course it's a matter of personal preferences, how many files and 
clones should be open at the same time. At least I can end up in *very* 
many open files, when a change in source code results in compiler errors 
and consequential updates of many dependent files. It can be helpful to 
keep all these files open, in case the preceding updates should be 
modified again...


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Does using GtkFrame in LCL make sense?

2011-07-01 Thread zeljko
On Friday 01 of July 2011 16:29:33 Max Vlasov wrote:
 On Fri, Jul 1, 2011 at 6:17 PM, Henry Vermaak henry.verm...@gmail.com 
wrote:
  On 01/07/11 15:09, Henry Vermaak wrote:
  On 01/07/11 14:44, Henry Vermaak wrote:
  On 01/07/11 13:17, Max Vlasov wrote:
  Trying to solve the problem, I ended up with the following replacement
  in the TGtk2WSCustomPanel.CreateHandle
  
  {  Before }
  
  Frame := gtk_frame_new(nil);
  gtk_frame_set_shadow_type(PGtkFrame(Frame),
  BorderStyleShadowMap[TCustomControl(AWinControl).BorderStyle]);
  
  gtk_container_set_border_width(PGtkContainer(Frame), 0) here seems to
  make it better.
  
  Actually, it doesn't make a difference. The thing that fooled me is that
  my panels on debian are bigger than yours on ubuntu.
  
  That said, changing the frame to gtk_alignment_new(0, 0, 1, 1) seems to
  work for me.  What does it look like on Ubuntu?
 
 Henry, works correctly in Ubuntu, looks like a good candidate. At
 least it hasn't bad history of the scrolling control so maybe also
 fixes the same problems. But I still can not catch OnPaint from all 3
 variants (Frame, Scrolling, Alignment) bevel-less or not. So I don't
 understand what was that fix (#19488) about.

don't know ... maybe ask reporter of that issue and August.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] gtk2 TCustomControl.Paint, InvalidateRect

2011-07-01 Thread Armin Diehl
I have a problem with InvalidateRect with gtk2 on linux, Canvas.ClipRect 
always returns the full area and not the rect that needs to be updated. 
Under windows, everything works fine.
My problem is that within a terminal emulation program i have to draw a 
blinking cursor (250 ms) and blinking chars (500 ms). Under gtk2, 
invalidating the area with the cursor (InvalidateRect(Handle, @rect, 
FALSE)) does not work and my paint will always repaint the whole 
terminal area and this causes a high cpu utilization. Under windows it 
works fine and only the cursor or other invalid parts will be drawn 
within paint.

Any idea what i can do under linux gtk2 ?

Thx

Armin


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE flaws

2011-07-01 Thread Martin

On 01/07/2011 15:28, Hans-Peter Diettrich wrote:



You should still be able to drag/drop it back to the original window, 
holding CTRL for copy/clone


No target responds to dragging, regardless of CTRL :-(

BTW, CTRL is the wrong modifier, it's intended to *ignore* all 
possible targets.


Is there an official definition for that somewhere?

Because even microsoft uses it that way. Using the windows (file) explorer:
- If I drag/drop a file (with no modifier key): It is movedor copied 
(depends on same/other disk

- With CTRL: always copy
- with shift: always move

In none of those cases any modifier key has anything todo with ignoring 
possible targets


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Does using GtkFrame in LCL make sense?

2011-07-01 Thread Max Vlasov
On Fri, Jul 1, 2011 at 6:17 PM, Henry Vermaak henry.verm...@gmail.com wrote:
 On 01/07/11 15:09, Henry Vermaak wrote:

 On 01/07/11 14:44, Henry Vermaak wrote:

 On 01/07/11 13:17, Max Vlasov wrote:

 Trying to solve the problem, I ended up with the following replacement
 in the TGtk2WSCustomPanel.CreateHandle

 {  Before }

 Frame := gtk_frame_new(nil);
 gtk_frame_set_shadow_type(PGtkFrame(Frame),
 BorderStyleShadowMap[TCustomControl(AWinControl).BorderStyle]);

 gtk_container_set_border_width(PGtkContainer(Frame), 0) here seems to
 make it better.

 Actually, it doesn't make a difference. The thing that fooled me is that
 my panels on debian are bigger than yours on ubuntu.

 That said, changing the frame to gtk_alignment_new(0, 0, 1, 1) seems to work
 for me.  What does it look like on Ubuntu?


The only problem here is that GtkAlignment has no shadow function so
can't respond correctly to the BorderStyle property (both Frame and
ScrollingWindow have). But I suppose in this case it can be just done
with additional custom drawing.

Max

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE flaws

2011-07-01 Thread Martin

On 01/07/2011 16:34, Hans-Peter Diettrich wrote:

Martin schrieb:

Actually, I just checked on windows vista, and it works (2nd window 
allows cloning back to 1st window). I tested before, but tricked myself.


Oops, *this* seems to be the reason!

Please not when you test, that there is another restriction. Each 
unique file can only have one tab per window.


That's okay, but the IDE breaks even this rule :-(

When a project is loaded, and problems in the resources (.lfm) are 
found, this file is opened *twice* in the same window. When this 
happens, it's highly recommended to create a new project and cancel 
updates of the old project - everything else will lead to strange 
errors, up to making the IDE unresponsive :-(

I haven't tested that.

But the bug is *probably* unrelated to the above:

The rule for Each file only once per window applies to linked/shared 
editors. (Edit the file in one place, updates all other places / 
Internally the IDE has that file open ONCE)


Your case *sounds* as if (I have not tested it) the file is opened a 2nd 
time, and the IDE treats it as 2 different files.

Out of interest: did you compare the full filenames (path + name)?





So if you cloned unit1 from window-1 to window-2, then it is open 
in both windows. This means you can not clone (not move) it to 
window-1 as it is already open there.


That's okay so far but, as you see, it can lead to confusion. I've 
just added another (lengthy) note to issue 19666, that explains what I 
consider *desired* behaviour instead:


The Clone menu should allow to simply *activate* an already existing 
*or* newly created clone. Currently it can be very time consuming to 
scroll through the tabs of the target window, shifting one by one, 
until an already existing clone is found there.
I already suggested an pagewise scroll through the tabs, instead of 
shifting one by one, but this idea was rejected a long time ago...


The display disabled menu entry, instead of display none makes sense.

Jumping to the same source, in an other window, is an interesting 
feature, but should not be unde move/clone menu, (imho it would lead 
to confusion there).
There could be a sub menu find in other window; though that leads to 
more menu entries in the main popup, and the popup is already very big.




Related issue: can the entries in the Window menu be sorted 
alphabetically, so that it will be easier to find and activate a page 
by name?

probably, but I don't know anyone working on it
Discussions on this and similar had been plenty in the past.
An extension package could also solve this, displaying files in many 
interesting ways in a file navigation window)... but no one has yet 
written it.


Of course it's a matter of personal preferences, how many files and 
clones should be open at the same time. At least I can end up in 
*very* many open files, when a change in source code results in 
compiler errors and consequential updates of many dependent files. It 
can be helpful to keep all these files open, in case the preceding 
updates should be modified again...


I think the maximum of open files (not tabs, but unique files) I have 
ended up with so far, would be around 40.

The maximum number of source windows I ever used would be around 9



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE flaws

2011-07-01 Thread Martin

On 01/07/2011 16:34, Hans-Peter Diettrich wrote:

Martin schrieb:
So if you cloned unit1 from window-1 to window-2, then it is open 
in both windows. This means you can not clone (not move) it to 
window-1 as it is already open there.


That's okay so far but, as you see, it can lead to confusion. I've 
just added another (lengthy) note to issue 19666, that explains what I 
consider *desired* behaviour instead:


The Clone menu should allow to simply *activate* an already existing 
*or* newly created clone. Currently it can be very time consuming to 
scroll through the tabs of the target window, shifting one by one, 
until an already existing clone is found there.
I already suggested an pagewise scroll through the tabs, instead of 
shifting one by one, but this idea was rejected a long time ago...


BTW, you are away of the page locking feature ? 
http://lazarus-dev.blogspot.com/2010/04/page-locking-or-multiply-editor-windows.html


Assign it to a key-shortcut.

Then lock the current editor, and to a declaration jump. With the 
default settings, this should go to the file in the 
last-focused-editor-for-that-file (can be changed to 
Editor-for-that-file-in-the-most-recent-focused-window)

That is, if the jump target is not already visible in the window...



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE flaws

2011-07-01 Thread Martin

On 01/07/2011 15:52, Martin wrote:

On 01/07/2011 16:34, Hans-Peter Diettrich wrote:

Martin schrieb:

So if you cloned unit1 from window-1 to window-2, then it is open 
in both windows. This means you can not clone (not move) it to 
window-1 as it is already open there.


That's okay so far but, as you see, it can lead to confusion. I've 
just added another (lengthy) note to issue 19666, that explains what 
I consider *desired* behaviour instead:


The Clone menu should allow to simply *activate* an already existing 
*or* newly created clone. Currently it can be very time consuming to 
scroll through the tabs of the target window, shifting one by one, 
until an already existing clone is found there.
I already suggested an pagewise scroll through the tabs, instead of 
shifting one by one, but this idea was rejected a long time ago...


The display disabled menu entry, instead of display none makes sense.

Jumping to the same source, in an other window, is an interesting 
feature, but should not be unde move/clone menu, (imho it would lead 
to confusion there).
There could be a sub menu find in other window; though that leads to 
more menu entries in the main popup, and the popup is already very big.


An other option would be, 2 have several sections in the sub menu.

Clone to Window (Submenu)
   Clone to new window
   -
   Clone to window 1
   Clone to window 3
   -
   Goto to window 2 (existing clone)


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Ctrl + Space Window Source lazarus

2011-07-01 Thread Hans-Peter Diettrich

Marcelo Silva (IG) schrieb:

I do not know the name of that little window that opens when you press 
Ctrl + Space lazarus.

But I know I know what I mean.
In Delphi Right clicking it gives you the option to sort by name or scope,
this way is easier to find a particular property or function.


This would be *very* nice in Lazarus, too :-)

DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Ctrl + Space Window Source lazarus

2011-07-01 Thread silvioprog
2011/7/1 Hans-Peter Diettrich drdiettri...@aol.com:
 Marcelo Silva (IG) schrieb:

 I do not know the name of that little window that opens when you press
 Ctrl + Space lazarus.
 But I know I know what I mean.
 In Delphi Right clicking it gives you the option to sort by name or scope,
 this way is easier to find a particular property or function.

 This would be *very* nice in Lazarus, too :-)

I agree.

 DoDi

-- 
Silvio Clécio
===
Blog - silvioprog.com.br
Twitter - twitter.com/silvioprog
LazSolutions - code.google.com/p/lazsolutions
LazWebSolutions - code.google.com/p/lazwebsolutions
Lazarus-BR - groups.google.com.br/group/lazarus-br?hl=pt-BR
===
   * Conheça nosso canal IRC sobre Lazarus: #lazarus-br *
===

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE flaws

2011-07-01 Thread Hans-Peter Diettrich

Martin schrieb:

BTW, CTRL is the wrong modifier, it's intended to *ignore* all 
possible targets.


Is there an official definition for that somewhere?


Is Delphi official enough? ;-)

But you may be right, above applies to drag-dock, not to drag-drop. In 
notebook-docking the notebook tabs are designed for drag-dock, not for 
drag-drop. Otherwise it were impossible to undock a page into floating 
state. The different handling in the Lazarus editor is somewhat confusing...


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE flaws

2011-07-01 Thread Hans-Peter Diettrich

Martin schrieb:

BTW, you are away of the page locking feature ? 
http://lazarus-dev.blogspot.com/2010/04/page-locking-or-multiply-editor-windows.html 


Wow, really great. It will become one of my favorite Lazarus features, 
now that I know about it :-)


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE flaws

2011-07-01 Thread Martin

On 01/07/2011 17:58, Hans-Peter Diettrich wrote:

Martin schrieb:



The display disabled menu entry, instead of display none makes sense.


Hm, on further thought. displaying source-editors to which you can not 
move/clone as disabled menu entry, brings up a few questions.


- Should the current window also be shown? (Since it is not other I 
would not show it.


It would remove a current optimization:

If a file already has an editor in every window, then they would have to 
be all listed as disabled.
BUT currently in this case, the entire sub menu is hidded, and the 
pop-up contains the only entry that makes sense move/clone to NEW window


Also showing disabled menu entries, is fine, if there are few disabled. 
But having 8 windows open, with 7 disabled, and 1 enabled.


Having to think about

Martin


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] TStringGrid - ColResize on FixedCols (or Freeze Pane on ordinary columns)

2011-07-01 Thread Luiz Americo Pereira Camara

On 1/7/2011 09:44, Alexsander Rosa wrote:
Freeze pane is an expression from Excel spreadsheet: you freeze a 
few columns (usually with identification data) and scroll the rest. In 
TStringGrid it's done with FixedCols: they remain fixed (frozen) and 
the rest of the columns can be scrolled. This part is fine, the 
freeze pane feature is there. However, in TStringGrid the fixed 
columns can't be manually resized even when you set goColumnResize to 
true. I wish there were an option like goFixedColsResize or something.


VirtualTreeView implements that

See in advanced demo GridDemo

Luiz

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] IDE flaws

2011-07-01 Thread Hans-Peter Diettrich

Martin schrieb:

On 01/07/2011 17:58, Hans-Peter Diettrich wrote:

Martin schrieb:



The display disabled menu entry, instead of display none makes sense.


Hm, on further thought. displaying source-editors to which you can not 
move/clone as disabled menu entry, brings up a few questions.


- Should the current window also be shown? (Since it is not other I 
would not show it.


It would remove a current optimization:

If a file already has an editor in every window, then they would have to 
be all listed as disabled.


The menu entries also could be marked in a way, that allows to determine 
whether a clone already exists there (not need to create a new one), or 
not (will result in creation of a new clone). Then every menu entry can 
be kept enabled, with only slightly different semantics.


DoDi


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus