Using designed forms in an application
Using designed forms in an application
I'm using the demo linux version at the moment to decide if I will buy purebasic or not.
How do I use forms designed in the designer within an application?
I can design forms and see that code is generated. Do I simply copy this code into my app code, for example? Do I use some sort of include command in my code?
I'm at the point in my learning curve where I want to start putting code behind buttons and fields, etc., but can't find any help or tutorial that shows how the IDE and formdesigner fit together. I got hold of PureBasic - A Beginners Guide Book but that is singularly unhelpful.
Can someone please help me make this last step?
Thanks for reading. Any advice is welcome.
How do I use forms designed in the designer within an application?
I can design forms and see that code is generated. Do I simply copy this code into my app code, for example? Do I use some sort of include command in my code?
I'm at the point in my learning curve where I want to start putting code behind buttons and fields, etc., but can't find any help or tutorial that shows how the IDE and formdesigner fit together. I got hold of PureBasic - A Beginners Guide Book but that is singularly unhelpful.
Can someone please help me make this last step?
Thanks for reading. Any advice is welcome.
-
jesperbrannmark
- Enthusiast

- Posts: 536
- Joined: Mon Feb 16, 2009 10:42 am
- Location: sweden
- Contact:
Re: Using designed forms in an application
you can use the excellent form designer made by polo (included in pb).
Do like this:
1. Click on "button"
2. Now go to the window and hold your mouse down and move it down and to the right and when you get the size you want - you have your button.
3. Save the file as "test"
4. Jump over to pb and write
include "test.pbf"
5. Save as "test"
6. Press F5
You can alter the form, you can choose to have event handler included or not etc...
You can go from code view to design view...
You can write code and do forms at the same time..
Do like this:
1. Click on "button"
2. Now go to the window and hold your mouse down and move it down and to the right and when you get the size you want - you have your button.
3. Save the file as "test"
4. Jump over to pb and write
include "test.pbf"
5. Save as "test"
6. Press F5
You can alter the form, you can choose to have event handler included or not etc...
You can go from code view to design view...
You can write code and do forms at the same time..
Re: Using designed forms in an application
Hello nospan, you can follow the steps that Jesper described, it'll give you a great way to get started!
There are plan to write documentation so that the Form Designer is easier to use, that should happen for next PB release
There are plan to write documentation so that the Form Designer is easier to use, that should happen for next PB release
- the.weavster
- Addict

- Posts: 1581
- Joined: Thu Jul 03, 2003 6:53 pm
- Location: England
Re: Using designed forms in an application
Welcome nospam.
The form designer is already better than the one you're using with the Linux demo, the Linux package was not updated to include the latest version in error.
You can have your form's event handlers in a separate file to the form's UI design. The events file is specified as one of the properties of the window, you can then connect each gadget that triggers an event to a procedure in that file, the gadget ID and event type are passed as parameters.
This configuration means your code is nicely separated from the code output by the visual designer, as a result tweaking your design after the event is no problem.
The form designer is already better than the one you're using with the Linux demo, the Linux package was not updated to include the latest version in error.
You can have your form's event handlers in a separate file to the form's UI design. The events file is specified as one of the properties of the window, you can then connect each gadget that triggers an event to a procedure in that file, the gadget ID and event type are passed as parameters.
This configuration means your code is nicely separated from the code output by the visual designer, as a result tweaking your design after the event is no problem.
Re: Using designed forms in an application
the.weavster wrote:This configuration means your code is nicely separated from the code output by the visual designer, as a result tweaking your design after the event is no problem.
Polo wrote:There are plan to write documentation so that the Form Designer is easier to use, that should happen for next PB release
Thank you all very much. I'll play around with purebasic a little more and will probably buy the full version this afternoon.jesperbrannmark wrote:You can alter the form, you can choose to have event handler included or not etc...
You can go from code view to design view...
You can write code and do forms at the same time..
Re: Using designed forms in an application
Thanks, but that hardly counts as documentation. I need to know how to use the form designer properly. I have purchased pb and need to use the linux version. The only thing that the help text does in respect of the VD is make promises. It also talks about a .chm, which is a windows compiled html file type. $100 bucks down and nowhere to go.jesperbrannmark wrote:Do like this:
1. Click on "button"
If you get the impression I'm not happy, you got it right.
Re: Using designed forms in an application
Oh, great. A complex environment with zero documentation. Where can I get a refund?Polo wrote:There are plan to write documentation so that the Form Designer is easier to use, that should happen for next PB release
Re: Using designed forms in an application
Support@purebasic.com if that's not to complicated for you 
Re: Using designed forms in an application
Sending an email to support won't exactly help anyone else with the same basic question, now, will it? Is it common on this forum to respond to reasonable questions, such as, "where is the documentation for this product, which I just paid a hundred or more bucks for?" to be met with weakly disguised insult?juror wrote:if that's not to complicated for you
fwiw, junior, here's your 2c back... Keep the change.
Re: Using designed forms in an application
Your comment - just providing an answer that you MIGHT be able to understand.nospam wrote: Oh, great. A complex environment with zero documentation. Where can I get a refund?
you can have your 2c back ahole.
Re: Using designed forms in an application
I assume then that the answer to the question, "Is it common on this forum (for) reasonable questions ... to be met with weakly disguised insult?" is yes.juror wrote:Your comment - just providing an answer that you MIGHT be able to understand.nospam wrote: Oh, great. A complex environment with zero documentation. Where can I get a refund?
you can have your 2c back ahole.
Re: Using designed forms in an application
I got it sorted, thank you. I now know how it hangs together.jesperbrannmark wrote:You can alter the form, you can choose to have event handler included or not etc...
You can go from code view to design view...
You can write code and do forms at the same time..
-
jesperbrannmark
- Enthusiast

- Posts: 536
- Joined: Mon Feb 16, 2009 10:42 am
- Location: sweden
- Contact:
Re: Using designed forms in an application
I would strongly suggest you use a better tone in the forum.
This forum mainly consists of normal people like me and a lot of the other people who were kind enough to reply to your question. This because we have in the past always gotten along, more or less, here and been able to help each other.
Sorry everyone, this was a bit off-topic.
Hope you have a better future experience with Purebasic, it is a awsome language with a great community.
This forum mainly consists of normal people like me and a lot of the other people who were kind enough to reply to your question. This because we have in the past always gotten along, more or less, here and been able to help each other.
Sorry everyone, this was a bit off-topic.
Hope you have a better future experience with Purebasic, it is a awsome language with a great community.
People, please calm down.
I just jump in here now, to clear things out a little and to calm people down as well.Oh, great. A complex environment with zero documentation. Where can I get a refund?
(So for a few seconds, breathe and please read the following explanation without an upset mind)
If you think PureBasic and/or the FormDesinger is a complex environment, than you've never took a look at Eclipse, Netbeans or any other 'Enterprise Programming Environement'.
The way the Form Designer works is more or less self explaining, at least for the "Draw your own GUI"-part. How to use the output, however, is a different story. Therefore I hereby offer Polo to write a beginners tutorial on this.
Regarding the 'refund': AFAIK you're currently working with a Demo version of PureBasic (correct me if I'm wrong). There won't be a refund for trying a demo. Next is: Polo is developing the Form Designer in his spare time as a hobby FOR FREE and the PureBasic Team just adds this product to the PureBasic package FOR FREE. I guess it's strange to want a refund for that.
That said: you're welcome to try out PureBasic and fall in love with this great programming language like we did. We beg you for a little patience with the FREE offered products and none here will refuse to help you whenever you have a question.
It's also your freedom to say: no, this is not the right product for me.
Then you're free to move on and find someting else.
Have a nice day!
cheers,
bembulak
bembulak
Re: People, please calm down.
I stand up to being insulted therefore I'm upset?bembulak wrote:(So for a few seconds, breathe and please read the following explanation without an upset mind)
Wrong.If you think PureBasic and/or the FormDesinger is a complex environment, than you've never took a look at Eclipse, Netbeans or any other 'Enterprise Programming Environement'.
I already said I got it sorted, and I thanked those who helped.The way the Form Designer works is more or less self explaining, at least for the "Draw your own GUI"-part. How to use the output, however, is a different story. Therefore I hereby offer Polo to write a beginners tutorial on this.
You're wrong. Again.Regarding the 'refund': AFAIK you're currently working with a Demo version of PureBasic (correct me if I'm wrong).
Code: Select all
There won't be a refund for trying a demo.Your 'FREE' cost me more than a hundred bucks.Next is: Polo is developing the Form Designer in his spare time as a hobby FOR FREE and the PureBasic Team just adds this product to the PureBasic package FOR FREE. I guess it's strange to want a refund for that.
[/quote]That said: you're welcome to try out PureBasic and fall in love with this great programming language like we did. We beg you for a little patience with the FREE offered products and none here will refuse to help you whenever you have a question.
It's also your freedom to say: no, this is not the right product for me.
Then you're free to move on and find someting else.
PureBasic is fine. I've got it singing and dancing already, thank you. It's nicely advanced with lots of great features. About the only thing I've noticed missing so far is support for in-memory databases, but the basic functions needed to implement such a thing are all there.