Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-11

Noobie - Interface problem in Windows

5 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin

Hi,

I am a bit of a noobie to Lazarus and I have been designing an app with Lazarus running under Linux. It all seemed to be going well. Tonight I booted into Windows and decided to quickly compile the app to see what it looked like and there is a problem with a blue background that I don't get compiling under Linux.

See these screenshots as an example:

Running under Windows 7, Lazarus 1.0.12 fpc 2.6.2
https://dl.dropboxusercontent.com/u/3940444/laz_windows%201.0.12%20fpc%202.6.2.png

Running under Linux (LMDE), Lazarus 1.0.10 fpc 2.6.2 gtk https://dl.dropboxusercontent.com/u/3940444/laz_linux%201.0.10%20fpc%202.6.2.png

Running under Linux (LMDE), Lazarus 1.3 svn fpc 2.6.2 Qt https://dl.dropboxusercontent.com/u/3940444/laz_linux%201.3%20fpc%202.6.2.png

The tabs are a TTabControl rather than a TPageControl. My thinking behind using a TabControl was that only minor UI changes will be required when the tab changes and I could do this with code. If I used a PageControl I would have had to make copies of all the UI items for each page, which would mean a lot of time, effort and probably a bigger binary.

Not sure why I am getting a blue background only in Windows, when it looks fine in Linux? All the UI elements below the TabControl appear to be it's children in the object inspector. Should I have placed a panel before placing the other UI elements?

I very much appreciate any help or guidance you can offer me.

Thanks & best regards,

Martin

Reply by email

David Taylor
to Martin
Martin wrote 38 lines
Hi, I am a bit of a noobie to Lazarus and I have been designing an app with Lazarus running under Linux. It all seemed to be going well. Tonight I booted into Windows and decided to quickly compile the app to see what it looked like and there is a problem with a blue background that I don't get compiling under Linux. See these screenshots as an example: Running under Windows 7, Lazarus 1.0.12 fpc 2.6.2 https://dl.dropboxusercontent.com/u/3940444/laz_windows%201.0.12%20fpc%202.6.2.png Running under Linux (LMDE), Lazarus 1.0.10 fpc 2.6.2 gtk https://dl.dropboxusercontent.com/u/3940444/laz_linux%201.0.10%20fpc%202.6.2.png Running under Linux (LMDE), Lazarus 1.3 svn fpc 2.6.2 Qt https://dl.dropboxusercontent.com/u/3940444/laz_linux%201.3%20fpc%202.6.2.png The tabs are a TTabControl rather than a TPageControl. My thinking behind using a TabControl was that only minor UI changes will be required when the tab changes and I could do this with code. If I used a PageControl I would have had to make copies of all the UI items for each page, which would mean a lot of time, effort and probably a bigger binary. Not sure why I am getting a blue background only in Windows, when it looks fine in Linux? All the UI elements below the TabControl appear to be it's children in the object inspector. Should I have placed a panel before placing the other UI elements? I very much appreciate any help or guidance you can offer me. Thanks & best regards, Martin

Martin,

FWIW, I /prefer/ the blue background! It may be worth checking on Windows themes support (I'm new to Lazarus as well).

By the way, it's MSNs, and not MSN's.

Cheers

Reply by email

Mark Morgan Lloyd
to David Taylor
David Taylor wrote 21 lines
On 16/11/2013 23:22, Martin wrote: > Hi, > > I am a bit of a noobie to Lazarus and I have been designing an app with > Lazarus running under Linux. It all seemed to be going well. Tonight I > booted into Windows and decided to quickly compile the app to see what > it looked like and there is a problem with a blue background that I > don't get compiling under Linux. > > See these screenshots as an example: > > Running under Windows 7, Lazarus 1.0.12 fpc 2.6.2 > https://dl.dropboxusercontent.com/u/3940444/laz_windows%201.0.12%20fpc%202.6.2.png > > > > Running under Linux (LMDE), Lazarus 1.0.10 fpc 2.6.2 gtk > https://dl.dropboxusercontent.com/u/3940444/laz_linux%201.0.10%20fpc%202.6.2.png FWIW, I /prefer/ the blue background! It may be worth checking on Windows themes support (I'm new to Lazarus as well).

..although it's clearly wrong, since it's abutting assymetrically against the rule in the "Notice Type" box.

Martin: if you're a nood then I definitely am, but what have you done there: positioned the components with explicit "Top" and "Left" properties, or twiddled with the BorderSpacing? I'd have normally used panels behind with appropriate alignment, or possibly adjustable splitters.

Is the blue one of the predefined Windows thematic colours, e.g. clWindow?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Martin Collins
to Mark Morgan Lloyd

Hi,

Thanks for replies.

Re: Windows theme support (David) - On my Windows I had turned off all the visuals to try and speed up my slow computer, so that's why it looks a bit Win 2000. When I turned them back on the blue background has gone, like this:

https://dl.dropboxusercontent.com/u/3940444/laz_windows%201.0.12%20fpc%202.6.2%20with%20visuals.png

The TabControl has no colour property, so I assume it takes the colour property from the main form which was set to clDefault. I tried changing it to clWindow but the blue was still there.

I think from what Mark is saying that I need to go back to reading some more documentation about panels and alignment of UI elements in Lazarus, so that it will look the same whether compiled under Linux or Windows. To the question "have you positioned the components with explicit "Top" and "Left" properties, or twiddled with the BorderSpacing?", the answer is basically yes. I had even added some code to the onresize event of the main form to adjust width/left properties of the description and notes memo boxes at the bottom. There must be a better way than that so I shall go read.

Thanks for your help. I appreciate it. It's good to know that it's friendly here and I can come for help when needed. Oh, I deleted that wayward apostrophe too, thanks David!

Regards,

Martin

Earlier message 53 lines
------ Original Message ------ From: "Mark Morgan Lloyd" To: Sent: 17/11/2013 10:51:53 Subject: Re: [Lazarus] Noobie - Interface problem in Windows >David Taylor wrote: >>On 16/11/2013 23:22, Martin wrote: >>>Hi, >>> >>>I am a bit of a noobie to Lazarus and I have been designing an app >>>with >>>Lazarus running under Linux. It all seemed to be going well. Tonight >>>I >>>booted into Windows and decided to quickly compile the app to see >>>what >>>it looked like and there is a problem with a blue background that I >>>don't get compiling under Linux. >>> >>>See these screenshots as an example: >>> >>>Running under Windows 7, Lazarus 1.0.12 fpc 2.6.2 >>>https://dl.dropboxusercontent.com/u/3940444/laz_windows%201.0.12%20fpc%202.6.2.png >>> >>> >>>Running under Linux (LMDE), Lazarus 1.0.10 fpc 2.6.2 gtk >>>https://dl.dropboxusercontent.com/u/3940444/laz_linux%201.0.10%20fpc%202.6.2.png > >>FWIW, I /prefer/ the blue background! It may be worth checking on >>Windows themes support (I'm new to Lazarus as well). > >..although it's clearly wrong, since it's abutting assymetrically >against the rule in the "Notice Type" box. > >Martin: if you're a nood then I definitely am, but what have you done >there: positioned the components with explicit "Top" and "Left" >properties, or twiddled with the BorderSpacing? I'd have normally used >panels behind with appropriate alignment, or possibly adjustable >splitters. > >Is the blue one of the predefined Windows thematic colours, e.g. >clWindow? > >-- Mark Morgan Lloyd >markMLl .AT. telemetry.co .DOT. uk > >[Opinions above are the author's, not those of his employers or >colleagues] > >-- >_______________________________________________ >Lazarus mailing list > >http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Mark Morgan Lloyd
to Martin Collins
Martin Collins wrote
The TabControl has no colour property, so I assume it takes the colour property from the main form which was set to clDefault. I tried changing it to clWindow but the blue was still there.

Not, apparently, a safe assumption. In this case if you want an explicit colour rather than a widgetset-defined default it looks as though you need a panel.

Thanks for your help. I appreciate it. It's good to know that it's friendly here and I can come for help when needed.

:-) but I suggest not having an unqualified "Martin" in your email address since we've already got one of those.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email