Recent

Author Topic: Memo columns etc  (Read 24158 times)

MikeFinch

  • Jr. Member
  • **
  • Posts: 79
Memo columns etc
« on: July 25, 2009, 04:06:17 am »
I have translated successfully all my programs from Delphi to WINDOWS Lazarus; there are problems with LINUX (Mandriva) Lazarus however. (I got gtk2 to work after installing the correct Mandriva rpm).
A) In Delphi there wais a "columns" property for TMemo, which I used; no such thing in linux! I only have one long column on the LHS; I need MULTIPLE columns though.
B) For displaying of windows, BorderIcons = "[]" apparently doesn't work - i.e. NO icons. "-" and "x" actually still display. I think I found a problem also with Windows lazarus : setting "True" in at least one case didn't seem to work.
C) ComboBoxes : I just can't get a tidy display for lists. ComboBox seems to be corrupted somehow, unless I'm missing the correct sequence of settings.
Otherwise, mainly fine!!  :D
Can anyone shed light on the above problems please?  :(
Regards
Mike Finch : mikfinch@bigpond.net.au if personal contact required............

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: Memo columns etc
« Reply #1 on: August 08, 2009, 02:40:45 pm »
A) In Delphi there wais a "columns" property for TMemo, which I used; no such thing in linux! I only have one long column on the LHS; I need MULTIPLE columns though.

There is no columns property for TMemo in Lazarus because the native controls for a TMemo in most platforms wouldn't support it, use another control to have a TMemo with columns, I suggest TStringGrid, maybe TListView also.

Quote
B) For displaying of windows, BorderIcons = "[]" apparently doesn't work - i.e. NO icons. "-" and "x" actually still display. I think I found a problem also with Windows lazarus : setting "True" in at least one case didn't seem to work.

Please create a bug report in the bug tracker with an example application attached and a good description of the expected behavior (even better comparing images of expected and actual result)

Quote
C) ComboBoxes : I just can't get a tidy display for lists. ComboBox seems to be corrupted somehow, unless I'm missing the correct sequence of settings.

I don't know what a "tidy display" is, please explain better what the problem is with code and screenshot.

MikeFinch

  • Jr. Member
  • **
  • Posts: 79
Re: Memo columns etc
« Reply #2 on: August 09, 2009, 01:55:21 pm »
sekel : my comments on TMemo should have been for TListBox; could you please refer to commentaries under Installation / Linux /.

I will attend to a Bug Report tomorrow; it's 9.50pm Sunday at the moment.

A 'tidy display" means a listing, with vertical scrollbar, in the confines of the combobox, not downwards "forever" (A to Z). And the listing is simply disoriented for want of a better word (not technical I know).

My Windows versions work correctly. There's more under Installation / Linux /.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Memo columns etc
« Reply #3 on: August 09, 2009, 05:47:41 pm »
sekel : my comments on TMemo should have been for TListBox;

If you need a list box that has column headers and variable width tab settings, you might take a look at the Orpheus TOvcVirtualListBox control:

http://web.fastermac.net/~MacPgmr/OrphPort/OrphStatus.html

Try out the sample project in the tests/TestVLB folder.

Ported Orpheus requires Lazarus 0.9.26.x.

Thanks.

-Phil

MikeFinch

  • Jr. Member
  • **
  • Posts: 79
Same problems in new linux lazarus
« Reply #4 on: August 10, 2009, 06:54:31 am »
I have just tried the new linux lazarus (0.9.27.2.....) of 7 Aug; the previous was 15 July.

The same old problems are still there.

Thanks Phil for your Orpheus suggestion : but I don't need column headers and as far as I know column widths should adjust automatically? (not sure of this latter). Haven't checked if I set the width in the OI, or if the software divides the ListBox width by the number of columns desired :'(.

I can only keep harking back to my old lament : "If it works in Windows, why does it not work in Linux?".

I will have to sit back patiently and wait for linux "to catch up", because that is the way it seems to my amateur eye.  :'(


Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: Memo columns etc
« Reply #5 on: August 10, 2009, 08:42:23 am »
I will have to sit back patiently and wait for linux "to catch up", because that is the way it seems to my amateur eye.  :'(

In don't if it is the case here, but something like this happens quite often:
Lazarus user: Can you add (or publish) this property (for example TListBox.Columns).
Lazarus developers: I'd rather not, because the property cannot be implemented easily for gtk2 or qt. So this property will confuse other users that think the property is available on all widget sets.
Lazarus user: But Delphi has this property too. So you need to add for compatibility with Delphi.
Lazarus developer: But it will create new incompatibilities within Lazarus itself (for different widget sets). Delphi only needs to implement it on windows, that is easy.
Lazarus user: I only need this property for Windows, I don't need this property cross widget set.
Lazarus developer (reluctantly): Ok, we will add it, and mark it as restricted, so hopefully people will notice it is not available on all widget sets.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Memo columns etc
« Reply #6 on: August 10, 2009, 08:56:56 am »
You can also try to use TListView with ViewStyle = vsList

AFAIK it works fine for both Gtk and Windows

MikeFinch

  • Jr. Member
  • **
  • Posts: 79
Re: Memo columns etc
« Reply #7 on: August 10, 2009, 09:20:40 am »
Skalogryyz : Theo suggested I used TListView with vsReport and I had been trying vsList. Nothing worked!

As you can see from the very recent memos, ListBox.Columns isn't implemented in linux. That is, the case where a long list can be displayed from left to right within the confines of the ListBox using columns. Works in Windows.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Memo columns etc
« Reply #8 on: August 10, 2009, 02:56:10 pm »
Skalogryyz : Theo suggested I used TListView with vsReport and I had been trying vsList. Nothing worked!
How vsList is working on Linux? Is it different to windows?
Or is vcList not the one you need?

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: Memo columns etc
« Reply #9 on: August 10, 2009, 03:38:25 pm »
Mike Finch doesn't send a screenshot of what he expects.

I think he means something like in the attached image, which is indeed not possible afaics in Linux.  This is taken under Laz Win32 with NO columns defined.
The (main-) items just fill the horizontal space and then change to the next line (btw. they do not rearrange on windows either if the control resizes)

Otoh, he says here
http://www.lazarus.freepascal.org/index.php/topic,7155.msg33753.html#msg33753
that he wants the listing top-bottom not left-right.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: Memo columns etc
« Reply #10 on: August 10, 2009, 05:08:10 pm »
the problem can be solved by placing a bounty for the task :)

Lord_ZealoN

  • Full Member
  • ***
  • Posts: 141
    • http://lordzealon.com
Re: Memo columns etc
« Reply #11 on: August 10, 2009, 05:14:41 pm »
I will have to sit back patiently and wait for linux "to catch up", because that is the way it seems to my amateur eye.  :'(

In don't if it is the case here, but something like this happens quite often:
Lazarus user: Can you add (or publish) this property (for example TListBox.Columns).
Lazarus developers: I'd rather not, because the property cannot be implemented easily for gtk2 or qt. So this property will confuse other users that think the property is available on all widget sets.
Lazarus user: But Delphi has this property too. So you need to add for compatibility with Delphi.
Lazarus developer: But it will create new incompatibilities within Lazarus itself (for different widget sets). Delphi only needs to implement it on windows, that is easy.
Lazarus user: I only need this property for Windows, I don't need this property cross widget set.
Lazarus developer (reluctantly): Ok, we will add it, and mark it as restricted, so hopefully people will notice it is not available on all widget sets.

If lazarus has Delphi compatibility, great, but, maintain the compatibility at all costs, I don't think this is not good.

Lazarus runs on various OSs, and Delphi not. Only for this reason, is very difficult to maintain the compatibility always.
People who change from Delphi to Lazarus, may know thath some code may change, don't expect magic, because, then, "Lazarus only" users life, will be more complicated. Lazarus project has to see to the future.

Just my 2 cents.

Sorry for the noise.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Same problems in new linux lazarus
« Reply #12 on: August 10, 2009, 07:17:34 pm »
Thanks Phil for your Orpheus suggestion : but I don't need column headers and as far as I know column widths should adjust automatically? (not sure of this latter). Haven't checked if I set the width in the OI, or if the software divides the ListBox width by the number of columns desired :'(.

I can only keep harking back to my old lament : "If it works in Windows, why does it not work in Linux?".

The Orpheus TOvcListBox does support the Columns property you need, but it too is descended from TCustomListBox the same as TListBox, so that won't help you any.

The problem with some of these VCL features is that with the win32 widgetset you basically get support for them "for free". For example, it appears as though only one line of code calling the Win API is needed in win32wsstdctrls.pp to adjust the column width so that Windows will display the list in multiple columns. See TWin32WSCustomListBox.AdaptBounds.

So, how to do this on other platforms? Possibly only with a great deal of work. Maybe it's time you rolled up your sleeves and took a crack at implementing the Columns property for GTK2. A multi-column list box is actually a fairly common thing but it would need support on multiple platforms to be very useful.

Thanks.

-Phil

MikeFinch

  • Jr. Member
  • **
  • Posts: 79
Re: Memo columns etc
« Reply #13 on: August 11, 2009, 12:57:07 am »
OK Folks .... thanks for your input!

The problem is more involved than I anticipated (having to satisfy multiple platforms etc).............as far as doing something about it is concerned : I would if I could! I'm not equipped with the knowledge/competence to delve so deeply. Would be nice though.

Is anybody interested in what may be a connected issue ; the scrappy comboboxes I have eluded to? As I've said before, I want to display a (single-column!) presorted name list in a combobox (as I do in Windows). My list is the same as in ListBox, and it also "plunges" down to the end of the alphabet instead of halting at the bottom box border. I suspect I'm not setting something correctly. Is it that simple or is there something more serious?

The list doesn't appear when the cb appears; only when I click the (triangular) icon that accompanies the cb.

This one is vital to the operation of my program; the multiple column listing is not so important.  ;D

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: Memo columns etc
« Reply #14 on: August 11, 2009, 10:07:55 am »
Is it that hard to attach a screenshot showing what you dislike?
I don't know what you're talking about.

 

TinyPortal © 2005-2018