Recent

Author Topic: How to compile on windows using a GTK2 interface?  (Read 2516 times)

claudiocolares

  • Newbie
  • Posts: 6
How to compile on windows using a GTK2 interface?
« on: October 17, 2017, 04:47:33 pm »
Good morning everyone.
How to compile on windows using a GTK2 interface?
I want a multiplatform application, but as windows uses winapi and linux uses gtk, a dispocation of components is not the same on both interfaces.
I need to standardize.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4459
  • I like bugs.
Re: How to compile on windows using a GTK2 interface?
« Reply #1 on: October 17, 2017, 06:13:15 pm »
Bad strategy! You will be married to GTK2 for eternity which sounds unfortunate.
The right strategy is to use anchors and AutoSize in your layouts. Then all the GUI elements are located correctly also when themes and widgetsets change.
See the numerous GUI windows in Lazarus IDE as an example.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

zeljko

  • Hero Member
  • *****
  • Posts: 1594
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: How to compile on windows using a GTK2 interface?
« Reply #2 on: October 17, 2017, 06:17:27 pm »
Bad strategy! You will be married to GTK2 for eternity which sounds unfortunate.
The right strategy is to use anchors and AutoSize in your layouts. Then all the GUI elements are located correctly also when themes and widgetsets change.
See the numerous GUI windows in Lazarus IDE as an example.

Or he can use Qt on linux,win and mac :)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11382
  • FPC developer.
Re: How to compile on windows using a GTK2 interface?
« Reply #3 on: October 17, 2017, 06:26:53 pm »
Or use Wine :-)

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: How to compile on windows using a GTK2 interface?
« Reply #4 on: October 17, 2017, 07:00:59 pm »
Bad strategy! You will be married to GTK2 for eternity which sounds unfortunate.
The right strategy is to use anchors and AutoSize in your layouts. Then all the GUI elements are located correctly also when themes and widgetsets change.
See the numerous GUI windows in Lazarus IDE as an example.
In case OP wonders what autosize / layout is: http://wiki.lazarus.freepascal.org/Autosize_/_Layout

munair

  • Hero Member
  • *****
  • Posts: 798
  • compiler developer @SharpBASIC
    • SharpBASIC
Re: How to compile on windows using a GTK2 interface?
« Reply #5 on: October 17, 2017, 09:20:20 pm »
Bad strategy! You will be married to GTK2 for eternity which sounds unfortunate.
The right strategy is to use anchors and AutoSize in your layouts. Then all the GUI elements are located correctly also when themes and widgetsets change.
See the numerous GUI windows in Lazarus IDE as an example.

Or he can use Qt on linux,win and mac :)
Qt is indeed one of the best if it comes to native look on different platforms.
keep it simple

 

TinyPortal © 2005-2018