Re: [Lazarus] Large toolbar buttons

2014-04-06 Thread Richard Mace
Thanks Mattias,

 I was wondering what the best component was for a tool bar with large
  buttons and images on. I am trying to use the TToolbar component,
 however,
  it doesn't seem to display captions and I can't seem to get the buttons
 to
  be bigger than 16x16?
 
  Any ideas?

 Change the ImageList's Width and Height.


When I change the ImageLists's Height and Width it clears all of the
current images, I presume that because I have to add larger images in now?
Also, when do the captions get displayed?

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


Re: [Lazarus] Large toolbar buttons

2014-04-06 Thread Mattias Gaertner
On Sun, 6 Apr 2014 07:49:52 +0100
Richard Mace richard.m...@gmail.com wrote:

[...]
 When I change the ImageLists's Height and Width it clears all of the
 current images, I presume that because I have to add larger images in now?

Yes.

 Also, when do the captions get displayed?

Have you tried ShowCaptions?

Mattias

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


Re: [Lazarus] Large toolbar buttons

2014-04-06 Thread Richard Mace
On 6 April 2014 08:21, Mattias Gaertner nc-gaert...@netcologne.de wrote:

  Also, when do the captions get displayed?

 Have you tried ShowCaptions?


Yes, I have. The buttons are linked to Actions so not sure if that makes
any difference?

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


Re: [Lazarus] Large toolbar buttons

2014-04-06 Thread Mattias Gaertner
On Sun, 6 Apr 2014 10:35:11 +0100
Richard Mace richard.m...@gmail.com wrote:

 On 6 April 2014 08:21, Mattias Gaertner nc-gaert...@netcologne.de wrote:
 
   Also, when do the captions get displayed?
 
  Have you tried ShowCaptions?
 
 
 Yes, I have. The buttons are linked to Actions so not sure if that makes
 any difference?

If you set Caption to '' then there is no text.

Check also ShowCaption of the button.

Mattias

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


[Lazarus] Cursor on lists in IDE

2014-04-06 Thread Jürgen Hestermann

I am annoyed by a behaviour of the Lazarus IDE that seems
to exist in many other programs and components too:

When I delete an entry from a list (i.e. the debug watch list) then
no other entry is selected afterwards. Therefore I cannot delete
all entries by just keeping pressed the del key.
I have to move the cursor after each delete to get another entry selected.
Why is this so and can it be changed?

This behaviour is completely useless.
If the cursor entry disappears then
another entry should take its place of course.

I am just heavily making use of the VirtualTreeView
component which seems to behave similar.
Even if a node is focused it is not always selected too.
This forces a lot of work on me to set the focused node
to be selected too. This is especially annoying because it
is not *always* needed. The logic behind this is unclear.

Any ideas/comments?

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


[Lazarus] Ann: TButtonEdit as replacement for TEditButton

2014-04-06 Thread Bart
Hi all,

As per r44623 (trunk) the new TButtonEdit component replaces the
TEditButton component.
The new TButtonEdit is designed as Grouped Control, so it should
properly anchor and align.
(You need to clean build Lazarus in order to update the componentpallette.)

TEditButton is, for the time being, an alias for TButtonEdit, so that
forms with a TEditButton still can load.
If you find any regressions please report them in the bugtracker.
For the time being you can build Lazarus with -dUSEOLDEDITBUTTON to
still use the old implementation.

I would like to thank Derit Agustin for the initial implementation of
the new TCustomButtonEdit.

Bart

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


Re: [Lazarus] Ann: TButtonEdit as replacement for TEditButton

2014-04-06 Thread leledumbo
Finally :)
*executing: svn up



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Ann-TButtonEdit-as-replacement-for-TEditButton-tp4036553p4036554.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

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


Re: [Lazarus] Ann: TButtonEdit as replacement for TEditButton

2014-04-06 Thread Vojtěch Čihák

Hello,
 
I have some notes.
 
The main is that messages (like WMLButton etc.) does not work. This may in 
theory break other peoples' code.
 
The second is that default AutoSize was changed to False and initial height is 
hardcoded to 23 (but on my Qt are edits 21 pixel high so it's not consistent). 
I would keep AutoSIze = True as initial.
 
The third is that it's derived from TCustomControl. Since the only difference 
to TWinControl that I see here is the Canvas, which is useless here, I would 
derive from TWinControl.
 
Vojtech a.k.a. Blaazen 
__

Od: Bart bartjun...@gmail.com
Komu: Lazarus mailing list lazarus@lists.lazarus.freepascal.org
Datum: 06.04.2014 17:35
Předmět: [Lazarus] Ann: TButtonEdit as replacement for TEditButton


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus 
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] Ann: TButtonEdit as replacement for TEditButton

2014-04-06 Thread Bart
On 4/6/14, Vojtěch Čihák vojtech.ci...@atlas.cz wrote:

 I have some notes.

 The main is that messages (like WMLButton etc.) does not work. This may in
 theory break other peoples' code.

Not sure if that can be fixed.
The old design was a poor one and had to be fixed in a way similar to
the current one where the edit and the button are part of the
container.


 The second is that default AutoSize was changed to False and initial height
 is hardcoded to 23 (but on my Qt are edits 21 pixel high so it's not
 consistent). I would keep AutoSIze = True as initial.

Hmm... It uses same numbers as (hardcode?) in TCustomEdit for height.
Autosize needs to be true. I'll fix that. (It was false by default
because it didn't work as expected in a previous commit).


 The third is that it's derived from TCustomControl. Since the only
 difference to TWinControl that I see here is the Canvas, which is useless
 here, I would derive from TWinControl.

Done that in a previous version, but IIRC it then looked different
(ugly), so I changed it back to TCustomControl.

Bart

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


Re: [Lazarus] Ann: TButtonEdit as replacement for TEditButton

2014-04-06 Thread Bart
On 4/6/14, Vojtěch Čihák vojtech.ci...@atlas.cz wrote:

 The second is that default AutoSize was changed to False
Fixed.

 The third is that it's derived from TCustomControl. Since the only
 difference to TWinControl that I see here is the Canvas, which is useless
 here, I would derive from TWinControl.

Looked at it again.
If done so then the buttons won't draw until you hoover the mouse over them.
Can't see why this is happening.

Bart

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


Re: [Lazarus] lfm file format

2014-04-06 Thread Marc Santhoff
On So, 2014-04-06 at 03:23 +0200, Mattias Gaertner wrote:
 On Sun, 06 Apr 2014 00:49:45 +0200
 Marc Santhoff m.santh...@web.de wrote:
 
  On Sa, 2014-04-05 at 12:23 +0200, Mattias Gaertner wrote:
   On Sat, 05 Apr 2014 12:06:20 +0200
   Marc Santhoff m.santh...@web.de wrote:
   
Hi,

ist there a complete documentation of Lazarus' LFM xml file format?
   
   No.
   If someone wants to start one I will help.
   Note: The xml format has not yet implemented all features.
  
  Oops, I confused something. I silently assumed .lfm's are stored in XML,
  but they are not. In fact the storage format is someting like XML
  without tags but python-like syntactical indentation.
 
 Yes.
 
  
  Now I'm confused. When and how is XML used to store form descriptions?
 
 Some people use it. The IDE does not.

I see.

  What use cases is it made for?
 
 Some people prefer xml.
 
  
  What I really want to do is to write some form descriptions (and code)
  by a generator program. If there is any existing code that can be reused
  it would be very helpful.
 
 This is too vague. What do you want to achieve?

I'm thinking about a programm that:
- opens a database
- generates form and source for each table
- uses mapping db-type - gui component
- uses configuration

If you ever used the Database Form Wizard/Assistant of Openoffice you
know what I want. Not exctly that way, but in result a basic form that
can be trimmed to fit by hand afterwards.
 
Maybe someone having good knowledge of the IDE source code can name the
unit(s) where writing and reading forms is handled?
   
   xml driver reader/writer:
   components/lazutils/laz_xmlstreaming.pas
   
   Component streaming in general:
   unit classes, see TReader/TWriter
   
   IDE additions:
   designer/jitforms.pp
  
  So for not generating form code myself I would learn to use jitforms
  unit. Do you see any problems in writing the code to a file instead of
  using it like in lazarus' desing mode?
 
 The jitforms unit is only useful if you want to write a form designer,
 which can load arbitrary forms with unknown classes.
 Normal loading/saving only needs the stuff of the RTL+LCL.

OK.

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] Ann: TButtonEdit as replacement for TEditButton

2014-04-06 Thread Michael Van Canneyt



On Sun, 6 Apr 2014, Bart wrote:


On 4/6/14, Vojtěch Čihák vojtech.ci...@atlas.cz wrote:


I have some notes.

The main is that messages (like WMLButton etc.) does not work. This may in
theory break other peoples' code.


Not sure if that can be fixed.
The old design was a poor one


Well, it used what was available at the time in the LCL, 
which was not much compared to what can be done today :)


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


Re: [Lazarus] lfm file format

2014-04-06 Thread Michael Van Canneyt



On Sun, 6 Apr 2014, Marc Santhoff wrote:


by a generator program. If there is any existing code that can be reused
it would be very helpful.


This is too vague. What do you want to achieve?


I'm thinking about a programm that:
- opens a database
- generates form and source for each table
- uses mapping db-type - gui component
- uses configuration

If you ever used the Database Form Wizard/Assistant of Openoffice you
know what I want. Not exctly that way, but in result a basic form that
can be trimmed to fit by hand afterwards.


Yes !

Please consider donating that to Lazarus :)

If you do, here some ideas:
- Allow both grid/detail form.
- Let the user control to some extent the kind of control that is generated.
- Having the ability to specify lookup controls for foreign key fields are 
important.
  That may include creating a new dataset that fetches data from the referenced 
table.

I have created such a wizard for Delphi (closed source) and it really helps creating 
forms very quickly. Having this available in Lazarus would be a real asset.


Michael.

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


Re: [Lazarus] lfm file format

2014-04-06 Thread Marc Santhoff
On So, 2014-04-06 at 21:03 +0200, Michael Van Canneyt wrote:
 
 On Sun, 6 Apr 2014, Marc Santhoff wrote:
 
  by a generator program. If there is any existing code that can be reused
  it would be very helpful.
 
  This is too vague. What do you want to achieve?
 
  I'm thinking about a programm that:
  - opens a database
  - generates form and source for each table
  - uses mapping db-type - gui component
  - uses configuration
 
  If you ever used the Database Form Wizard/Assistant of Openoffice you
  know what I want. Not exctly that way, but in result a basic form that
  can be trimmed to fit by hand afterwards.
 
 Yes !
 
 Please consider donating that to Lazarus :)

I thought about it, could be a good idea to get help.

 If you do, here some ideas:
 - Allow both grid/detail form.

Try the Wizard of Openoffice, the third (or so) step let's the user
switch between
- grid
- label above input field
- label in front of input field
- flating left to right, top to bottom (I'm not interested in this)

 - Let the user control to some extent the kind of control that is generated.

See mapping above. I was thinking about a type-component list to use at
generation time.

 - Having the ability to specify lookup controls for foreign key fields are 
 important.
That may include creating a new dataset that fetches data from the 
 referenced table.

I know, that's what e.g. Butler (java, on sourceforge) does. Not sure if
this is too much work for a first start.

 I have created such a wizard for Delphi (closed source) and it really helps 
 creating 
 forms very quickly. Having this available in Lazarus would be a real asset.

To reduce workload my idea is to have a standalone program. This saves
me from learning Lazarus' internals and wizard API. Maybe someone else
could take this task somewhen.

Currently I'm only in a pre-planning phase, my goal know is to check how
much work this would be, because it's a spare time effort.

[I knew I would open a can of worms ;)]

-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] lfm file format

2014-04-06 Thread Graeme Geldenhuys
On 2014-04-06 19:53, Marc Santhoff wrote:
 
 If you ever used the Database Form Wizard/Assistant of Openoffice you
 know what I want. Not exctly that way, but in result a basic form that
 can be trimmed to fit by hand afterwards.

I've never tried that but closer to home, Delphi IDE has something
similar built-in (if we are talking about the same thing). I don't know
if Lazarus has that.

I don't use TDataset, so might get the terminology wrong, so bare with
me. In Delphi you can hook up a TDataset to a database table. Then view
the TFields of that dataset. Drag those fields and drop them on the Form
Designer. The form Design will then automatically insert a TLabel and
appropriate DB-aware component, and hook that up to the TDataset. You
can use multi-select and drag all fields at once. I remember using this
back in Delphi 7 days to knock out prototype applications, but that was
also around the time I stopped using TDataset and DB-aware components.

Like I mentioned, I don't know if Lazarus supports that - I would be
surprised if it doesn't. Lazarus has many hidden features.


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] Large toolbar buttons

2014-04-06 Thread Richard Mace


 If you set Caption to '' then there is no text.

 Check also ShowCaption of the button.


The caption is set to Add user and the ShowCaption is set to true, but
it's still not showing the text on the button?

Thanks

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


Re: [Lazarus] lfm file format

2014-04-06 Thread Marc Santhoff
On So, 2014-04-06 at 21:37 +0200, Marc Santhoff wrote:

 - flating left to right, top to bottom (I'm not interested in this)
floating


 Currently I'm only in a pre-planning phase, my goal know is to check how
   now


-- 
Marc Santhoff m.santh...@web.de


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


Re: [Lazarus] Large toolbar buttons

2014-04-06 Thread Mattias Gaertner
On Sun, 6 Apr 2014 20:47:09 +0100
Richard Mace richard.m...@gmail.com wrote:

 
 
  If you set Caption to '' then there is no text.
 
  Check also ShowCaption of the button.
 
 
 The caption is set to Add user and the ShowCaption is set to true, but
 it's still not showing the text on the button?

What happens when you add another toolbar, set ShowCaptions to
true and add a button?

Mattias

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


Re: [Lazarus] Large toolbar buttons

2014-04-06 Thread Vojtěch Čihák

Hi,
 
there are two ShowCaption properties. One TToolButton.ShowCaption and the 
second TToolBar.ShowCaption.
Also, there is TToolBar.ButtonHeight when you need large buttons.
 
Blaazen 
__

Od: Richard Mace richard.m...@gmail.com
Komu: Lazarus mailing list lazarus@lists.lazarus.freepascal.org
Datum: 06.04.2014 21:47
Předmět: Re: [Lazarus] Large toolbar buttons



If you set Caption to '' then there is no text.

Check also ShowCaption of the button.
The caption is set to Add user and the ShowCaption is set to true, but it's 
still not showing the text on the button?ThanksRichard

--

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus 
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] Large toolbar buttons

2014-04-06 Thread Vojtěch Čihák

Hi,
 
there are two ShowCaption properties. One TToolButton.ShowCaption and the 
second TToolBar.ShowCaption.
Also, there is TToolBar.ButtonHeight when you need large buttons.
 
Blaazen 
__

Od: Richard Mace richard.m...@gmail.com
Komu: Lazarus mailing list lazarus@lists.lazarus.freepascal.org
Datum: 06.04.2014 21:47
Předmět: Re: [Lazarus] Large toolbar buttons



If you set Caption to '' then there is no text.

Check also ShowCaption of the button.
The caption is set to Add user and the ShowCaption is set to true, but it's 
still not showing the text on the button?ThanksRichard

--

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus 
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] Ann: TButtonEdit as replacement for TEditButton

2014-04-06 Thread Bart
On 4/6/14, Michael Van Canneyt mich...@freepascal.org wrote:

 The old design was a poor one

 Well, it used what was available at the time in the LCL,
 which was not much compared to what can be done today :)

Well, maybe that was frased a little crude, but no offense was
intended by all means.

Bart

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