Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Turbo Delphi GUI Tutorials

pascal

  • Please log in to reply
16 replies to this topic

#1 HelpMePlz

HelpMePlz

    CC Newcomer

  • Member
  • PipPip
  • 20 posts

Posted 03 April 2012 - 04:39 AM

I need help finding some decent tutorials for creating a Turbo Delphi user interface.

I have learnt to program in pascal in console mode, I know how to do a lot of stuff but because of the way my A Level course is laid out I only ever needed to learn to program using console mode. Now I am building a project in turbo delphi which needs to have a user interface.

I have already created prototypes for most of the procedures but I need to find a way to use them in a user interface. Basically I have no idea how to create a button or read in anything using a user interface and I would really appreciate it if someone could link me to some beginner tutorials which would help learn how to make and integrate a UI from scratch.

Thanks a ton!!
  • 0

#2 WingedPanther73

WingedPanther73

    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 03 April 2012 - 06:20 AM

Most of your work will be done through drag-and-drop of components onto a form. Once done, you can link events to methods, and start implementing your logic.
  • 1

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/


#3 Luthfi

Luthfi

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1320 posts
  • Programming Language:PHP, Delphi/Object Pascal, Pascal, Transact-SQL
  • Learning:C, Java, PHP

Posted 03 April 2012 - 09:16 AM

Wow! From the perspective of most Delphi programmers, you are learning Delphi backwards! :) So I believe you have passed the hardest part. Creating gui in design time is easy.

Just add a form, drag and drop controls and components you want/need. Then (this is only for the real beginners) inspect events of the controls. Most of the names of the events are very intuitive, so you can guess when they will be triggered and in turn you know what to do when they were triggered. Of course you don't have to handle all events. Just handle the most important ones to you (or actually your application). For example, for button controls (TButton objects) usually you only want to handle their OnClick event.

Good luck with the exploration!

Addition:

I just remembered that some tutorials here have very detailed steps on building GUIs (like dropping what to where and to name them, kind like that...). So you might want to check them out.
  • 1

#4 HelpMePlz

HelpMePlz

    CC Newcomer

  • Member
  • PipPip
  • 20 posts

Posted 03 April 2012 - 11:40 AM

Thanks for the help! I have some really ** version of Turbo Delphi portable which is ** me up but I think I have the general idea. I wasn't able to find any of those types of tutorials when I searched, could you maybe link me to some? I'd really appreciate it thanks!
  • 0

#5 Carver413

Carver413

    CC Newcomer

  • Member
  • PipPip
  • 13 posts

Posted 03 April 2012 - 04:32 PM

Perhaps you should try using Lazarus. it has everthing you need and its free
http://www.lazarussupport.com/
  • 1

#6 Luthfi

Luthfi

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1320 posts
  • Programming Language:PHP, Delphi/Object Pascal, Pascal, Transact-SQL
  • Learning:C, Java, PHP

Posted 04 April 2012 - 09:30 AM

These tutorials I know include detailed steps on building the guis. But I don't know if you could actually build the project in Turbo Delphi. Since there usually some differences between Delphi versions. And I never used Turbo Delphi, so could not tell what it can and can not.


  • 1

#7 HelpMePlz

HelpMePlz

    CC Newcomer

  • Member
  • PipPip
  • 20 posts

Posted 07 April 2012 - 03:32 AM

Thanks for the help everyone! I've made a decent amount of progress using Lazarus but I still don't know how to link between forms :/ What I mean is I have a log in form, and it has a button on it saying register, I want it to go to the register form and close the log-in form whenever I hit register but I can't figure out how :/
  • 0

#8 Luthfi

Luthfi

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1320 posts
  • Programming Language:PHP, Delphi/Object Pascal, Pascal, Transact-SQL
  • Learning:C, Java, PHP

Posted 07 April 2012 - 04:25 AM

Forms are just objects. Like other objects, you create concrete instance of them before use. However in Delphi projects you can autocreate some forms. This means the autocreated instance will available as soon as the project started. See this list by going Projects - Options - tab Forms in Delphi IDE.

Autocreating forms however is not advisable, except for main form and forms that really should be there in the whole lifetime of the application.
  • 0

#9 HelpMePlz

HelpMePlz

    CC Newcomer

  • Member
  • PipPip
  • 20 posts

Posted 08 April 2012 - 09:24 AM

Hmm... I don't really understand that whole objects thing lol, are there any lazarus tutorials :(?
  • 0

#10 Luthfi

Luthfi

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1320 posts
  • Programming Language:PHP, Delphi/Object Pascal, Pascal, Transact-SQL
  • Learning:C, Java, PHP

Posted 08 April 2012 - 10:24 AM

I see. Unfortunately, no matter whether you use Delphi or Lazarus, you still have to understand objects. Both requires basic understanding of OOP (Object Oriented Programming) if you want to quickly learn them. Using lazarus or Delphi implicitly indicates you want to build GUI applications with the help of forms, controls, and components. All of them are objects.

For a start, you can imagine that objects are records that have routines (procedures or functions) build into them.
  • 0

#11 HelpMePlz

HelpMePlz

    CC Newcomer

  • Member
  • PipPip
  • 20 posts

Posted 08 April 2012 - 10:35 AM

I probably know and understand what objects are but the way I've learnt it I probably just don't understand the correct terms etc.
  • 1

#12 Luthfi

Luthfi

    CC Leader

  • Expert Member
  • PipPipPipPipPipPipPip
  • 1320 posts
  • Programming Language:PHP, Delphi/Object Pascal, Pascal, Transact-SQL
  • Learning:C, Java, PHP

Posted 08 April 2012 - 10:39 AM

No problem. That is where code snippets will be a great help when you're explaining problems, ideas, etc.
  • 0





Also tagged with one or more of these keywords: pascal

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download