Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / i bought blue GUI...now what?

Author
Message
BULLSHOCK 2
Retired Moderator
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 12th Oct 2005 20:58
i am really confused with blue gui...

i just bought it and the other day i was messing around with rainbow, and i exported code for a gui that i liked...

but what do i do now?
i checked the help files but i dont quit understand...

is there any blue GUI tutorials anywhere??

i know this sounds VERY noobish...but please help

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Oct 2005 23:41
There are a handful of examples installed with Blue GUI. Reading them will explain far better than trying to explain it here.

BULLSHOCK 2
Retired Moderator
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 13th Oct 2005 17:27
what im talking about is this:

i know how to basically set up a program in blue gui...
but it seems that rainbow only sets up the variables...not the positions or anything...
but what im asking is how do i set up my button positions...does rainbow do that?

or i have to do it manually...because there is a lot of buttons...

The Nerd
19
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 13th Oct 2005 17:30 Edited at: 13th Oct 2005 17:36
Yes, rainbow also exports the positions of all the stuff you placed(buttons, labels and all that). Then export the code, and include it to your project. and volia! You now got all the variables for all the buttons + the positions and all that

what i'm saying is that when you then open up the exported code, then you will see all the variables and further down you'll see all the buttons, labels and stuff you placed. It has everything set up for you!

[EDIT] :

okay here's a little example. I opened blue and placed a button. Then exported the code, and the code looks like this:



see? As you can see it creates the button, make the size i asked for, place it just the position that i did in blue, and write the text in it that i did in blue!


-The Nerd

PanzerGameshere
Free Particle Engine For dbpro :
here
BULLSHOCK 2
Retired Moderator
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 13th Oct 2005 19:42
thats so weird...when i tried it...my code looked a lot like that...but that part below the
Quote: " If Not GUI_CONSTANTS Then errorMessage "GUI Constants not defined. Please include gui.dba when you compile" : end"

there was nothing...but there is like 10 globals at the top...

ok...if it is supposed to do that...i will try it again...

AndLabs
19
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 14th Oct 2005 05:39
OK.

First you need the startBlue command, which loads BlueGUI.



After that, you create the gadgets. For example, to make a label on a panel that says "Hello, World!", you do:



Finally, you run the loop:



The getEvent command will parse BlueGUI's actions. Once you get into complex programs you will understand events.

It is best if you use a function to make your handles (variables that store gadgets) global, as so:



Hope that gives you a start.

For the Software You Want, AMPERSAND LABORATORIES is the place!

BULLSHOCK 2
Retired Moderator
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 14th Oct 2005 06:05
thanks!!


just for clarifacation...does it have to be in that order?

The Nerd
19
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 14th Oct 2005 11:11 Edited at: 14th Oct 2005 11:13
Quote: "just for clarifacation...does it have to be in that order?
"


Well, it's always good to place the startblue "ID","Key" in the top of your source. Also you should make the gadgets somewere before the loop( This also depends on if you need to make a gadget when you hit the mouse etc. Then you would need to make the gadget in the loop when you hit the mouse). It's also a really good idea to place the getEvent command in the very start of the loop. Oh and you also need to declare the globals before the loop

PanzerGameshere
Free Particle Engine For dbpro :
here
AndLabs
19
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 14th Oct 2005 22:04
Well, you do need to make a parent before you need its children.

Here is a completed version of my example:



You could find some more in-depth tutorials somewhere, but I still hope that this is a good start for your BlueGUI apps.

Oh, and BTW - here is the syntax of the create functions for labels (text), panels (a background), buttons, check boxes (checkable buttons), and textboxes (text entry areas):



The parentGadget is a handle for a gadget, or 0 for the main window.

For Buttons, if isFlat is 1, then the gadget is a flat button rather than a raised, 3D button.

For Textboxes, if canHoldMultipleLines is 1, then the box can hold more than 1 line.

For the Software You Want, AMPERSAND LABORATORIES is the place!

BULLSHOCK 2
Retired Moderator
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 15th Oct 2005 01:52
ok...thanks guys...im trying to make a GUI with this code"



but whenever i compile...it comes up black and then exits...

can any one help me out with this problem?

it is supposed to pop up a message when the gaget is clicked...the message displays the gaget name.

Rob K
Retired Moderator
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 15th Oct 2005 02:31
Hi Bullshock,

The BlueGUI guide (available via Start > Programs > BlueGUI ) contains information to help you get started.

You should place the code exported from Rainbow at the bottom of the source, or in a separate include file. To actually create the user interface layout you have to insert a call to the createUI function.

So your code looks like this:




BlueGUI Windows Plugin
BULLSHOCK 2
Retired Moderator
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 15th Oct 2005 08:06
oh...ok...i didnt know it was in start...
thanks alot!

but read my above post...i posted my non-working code...can sombody tell me whats wrong?

The Nerd
19
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 15th Oct 2005 20:28 Edited at: 15th Oct 2005 20:31
I just fixed your code. It was a very simple problem You did not call the funtions at any point
Also i have put in a little piece of code in the loop that shows how i check if those kind of buttons are getting clicked. When you have compiled it. Try to click the "Add Button"




Hope it helps

-The Nerd

PanzerGameshere
Free Particle Engine For dbpro :
here
BULLSHOCK 2
Retired Moderator
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 15th Oct 2005 23:13
hey..um....nerd..

i pasted your code in the editor...changed my user and password...but when i try to run after compiling...it gives the gui constants not defined error...and it tells me to include gui.dba...

i tried to place gui.dba in that folder...i tried to include it in the project and everything...

it IS included...but my program doesnt reckegnize it for some reason...

if i delete that line of code for the error...my program comes up, but the buttons dont work...

can you tell me where the original gui.dba is...so i can try to re copy?

AndLabs
19
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 16th Oct 2005 00:13
[BlueGUI2Directory]\Samples\

Find it in any of the subdirectories with sources. Glad to see that you are getting used to BlueGUI!

For the Software You Want, AMPERSAND LABORATORIES is the place!

BULLSHOCK 2
Retired Moderator
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Shocking Bulls
Posted: 16th Oct 2005 01:47
yea...i think im getting the hang of it...

i replaced the gui.dba with the one in the samples...and i still have the same problem....

robk...do you know what the problem is?

JulesD
19
Years of Service
User Offline
Joined: 7th Feb 2005
Location:
Posted: 26th Oct 2005 11:34
1- Make sure you have Rainbow 1.02 and run it.

2- If you want your gadgets in the main DarkBasic Window I
suggest you create a "panel gadget" big enough for all your gadgets layout. If all other gadgets are on the panel they will be positioned properly. Check gadget properties to make sure that buttons and other gadgets are the child of the panel.

3- If you want your bottons and other gadgets in a moving window then click on "create a window gadget" icon. This will bring up a new window.Place gadgets in the new window. A panel is not required.

4- When you have what your looking for goto "File" menu then select
"Export DarkBasic Code", and save the .dba file to a folder of your choice.

5- Copy gui.dba. If you cannot find gui.dba click on start then search, select `All files and folders` and type "gui.dba" and click on search. You can copy it from there. Put it in the same folder as the .dba Rainbow file you saved earlier.

6- Run DarkBasic Editor and Select "File" from menu then "Open Source" select your .dba Rainbow file.Click on "Yes" with the pop ups.

7- Click on the 'Files' button to your right then on 'Browse' at the top and search for the gui.dba that you copied and pasted over to the same folder as your Rainbow File earlier.Select it then click on open.

8- Select your 'Rainbow file' by clicking on the "gui.dba" file name which is beside the "Run in step through mode" button near the top.
and changing it to your Rainbow file.

DO NOT EDIT ANY THING IN THE gui.dba file

9- Under all Global Gadget# commands type
startblue "your id","your key number" 'may have letters as well'

10- Next line under type 'createui()' this calls the function.

11- Next line under type 'wait key' This will keep your program from exiting right away.

This should work.

Login to post a reply

Server time is: 2024-05-06 14:13:02
Your offset time is: 2024-05-06 14:13:02