Page 1 of 3

Using designed forms in an application

Posted: Sun Nov 18, 2012 4:58 am
by nospam
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.

Re: Using designed forms in an application

Posted: Sun Nov 18, 2012 10:37 am
by jesperbrannmark
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..

Re: Using designed forms in an application

Posted: Sun Nov 18, 2012 10:51 am
by Polo
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 :)

Re: Using designed forms in an application

Posted: Sun Nov 18, 2012 2:37 pm
by the.weavster
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.

Re: Using designed forms in an application

Posted: Sun Nov 18, 2012 8:11 pm
by nospam
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 :)
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..
Thank you all very much. I'll play around with purebasic a little more and will probably buy the full version this afternoon.

Re: Using designed forms in an application

Posted: Wed Nov 21, 2012 1:03 am
by nospam
jesperbrannmark wrote:Do like this:
1. Click on "button"
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.

If you get the impression I'm not happy, you got it right.

Re: Using designed forms in an application

Posted: Wed Nov 21, 2012 1:05 am
by nospam
Polo wrote:There are plan to write documentation so that the Form Designer is easier to use, that should happen for next PB release :)
Oh, great. A complex environment with zero documentation. Where can I get a refund?

Re: Using designed forms in an application

Posted: Wed Nov 21, 2012 2:25 am
by juror
Support@purebasic.com if that's not to complicated for you :)

Re: Using designed forms in an application

Posted: Wed Nov 21, 2012 2:33 am
by nospam
juror wrote:if that's not to complicated for you :)
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?

fwiw, junior, here's your 2c back... Keep the change.

Re: Using designed forms in an application

Posted: Wed Nov 21, 2012 2:35 am
by juror
nospam wrote: Oh, great. A complex environment with zero documentation. Where can I get a refund?
Your comment - just providing an answer that you MIGHT be able to understand.

:)

you can have your 2c back ahole.

Re: Using designed forms in an application

Posted: Wed Nov 21, 2012 2:56 am
by nospam
juror wrote:
nospam wrote: Oh, great. A complex environment with zero documentation. Where can I get a refund?
Your comment - just providing an answer that you MIGHT be able to understand.

:)

you can have your 2c back ahole.
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.

Re: Using designed forms in an application

Posted: Wed Nov 21, 2012 5:45 am
by nospam
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..
I got it sorted, thank you. I now know how it hangs together.

Re: Using designed forms in an application

Posted: Wed Nov 21, 2012 6:45 am
by jesperbrannmark
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.

People, please calm down.

Posted: Wed Nov 21, 2012 11:40 am
by bembulak
Oh, great. A complex environment with zero documentation. Where can I get a refund?
I just jump in here now, to clear things out a little and to calm people down as well.
(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!

Re: People, please calm down.

Posted: Wed Nov 21, 2012 12:16 pm
by nospam
bembulak wrote:(So for a few seconds, breathe and please read the following explanation without an upset mind)
I stand up to being insulted therefore I'm upset?
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'.
Wrong.
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.
I already said I got it sorted, and I thanked those who helped.
Regarding the 'refund': AFAIK you're currently working with a Demo version of PureBasic (correct me if I'm wrong).
You're wrong. Again.

Code: Select all

There won't be a refund for trying a demo.
No? Really?
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.
Your 'FREE' cost me more than a hundred bucks.
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.
[/quote]

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.