Recent

Author Topic: TListView ViewStyle  (Read 747 times)

AliZairov

  • New Member
  • *
  • Posts: 18
TListView ViewStyle
« on: December 19, 2020, 12:27:28 am »
Hi. The project looks like this in linux environment

l.png

In a Windows environment like this

w.png

I do not understand the cause of the problem.

jamie

  • Hero Member
  • *****
  • Posts: 4214
Re: TListView ViewStyle
« Reply #1 on: December 19, 2020, 02:47:08 am »
must be the difference in widgets

The ListView is a native control in windows where as in Linux or at least the widget you are using most likely is emulating it...

more than likely the two do not behave the same way but in theory can display data in their own formats.
The only true wisdom is knowing you know nothing

AliZairov

  • New Member
  • *
  • Posts: 18
Re: TListView ViewStyle
« Reply #2 on: December 19, 2020, 09:53:45 am »
must be the difference in widgets

The ListView is a native control in windows where as in Linux or at least the widget you are using most likely is emulating it...

more than likely the two do not behave the same way but in theory can display data in their own formats.

Understood. Thank you for your answer.  :) I edit my design.

wp

  • Hero Member
  • *****
  • Posts: 8120
Re: TListView ViewStyle
« Reply #3 on: December 19, 2020, 10:43:39 am »
Can you confirm that you have the same ListView.ViewStyle in both Linux and Windows? What is the ViewStyle setting? Which widgetset is used in Linux?
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

AliZairov

  • New Member
  • *
  • Posts: 18
Re: TListView ViewStyle
« Reply #4 on: December 19, 2020, 12:09:06 pm »
Hi. Thank you for your answer.  :) I did manipulate the design, it is ok.

Can you confirm that you have the same ListView.ViewStyle in both Linux and Windows?

Code: Pascal  [Select][+][-]
  1.      object List: TListView
  2.         Left = 0
  3.         Height = 208
  4.         Top = 0
  5.         Width = 502
  6.         Align = alClient
  7.         BorderStyle = bsNone
  8.         Columns = <>
  9.         Items.LazData = {
  10.           560000000300000000000000FFFFFFFFFFFFFFFF00000000070000004C696272
  11.           61727900000000FFFFFFFFFFFFFFFF000000000700000050726F6772616D0000
  12.           0000FFFFFFFFFFFFFFFF000000000400000047616D65
  13.         }
  14.         LargeImages = ImageList
  15.         ReadOnly = True
  16.         RowSelect = True
  17.         ScrollBars = ssVertical
  18.         TabOrder = 0
  19.         ToolTips = False
  20.         ViewStyle = vsIcon
  21.       end
  22.  

What is the ViewStyle setting?

ViewStyle = vsIcon

Which widgetset is used in Linux?

GTK2

wp

  • Hero Member
  • *****
  • Posts: 8120
Re: TListView ViewStyle
« Reply #5 on: December 19, 2020, 05:50:57 pm »
I cannot confirm this observation. I tested a TListView with vsIcon style in both Windows (10 and 7) and Linux (LMDE/gtk2), and in both cases the caption of the list items is below the icon.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

AliZairov

  • New Member
  • *
  • Posts: 18
Re: TListView ViewStyle
« Reply #6 on: December 19, 2020, 07:07:53 pm »
I cannot confirm this observation. I tested a TListView with vsIcon style in both Windows (10 and 7) and Linux (LMDE/gtk2), and in both cases the caption of the list items is below the icon.

I do not know why. I partially solved the problem with the design measure. Soon I will share the project on github.

 

TinyPortal © 2005-2018