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.

DarkBASIC Professional Discussion / BBB GUI Problems?

Author
Message
Da_Rhyno
15
Years of Service
User Offline
Joined: 25th May 2011
Location:
Posted: 15th Oct 2011 02:16 Edited at: 15th Oct 2011 02:21
Hi all! I'm trying to learn how to use BBB GUI, and right now all I'm doing is putting a button in the main DBPro window that when it's pressed comes up with a message box.

Now for some reason when it's clicked, nothing happens.

Can anyone tell me what I'm doing wrong here?

EDIT: Here's a more straightforward example.

zenassem
23
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 15th Oct 2011 03:01
a is not going to be equal to 1. I think yo are confusing tjhe value of get clicked button() which is stored in a with property id.

let me see if ican quickly edit it
brb

Your signature has been erased by a mod please reduce it to 600 x 120.
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 15th Oct 2011 03:53
command GET CLICKED BUTTON() returns the handle of the last clicked button and not the state of the button as you used it.

So the correct use would be:



Da_Rhyno
15
Years of Service
User Offline
Joined: 25th May 2011
Location:
Posted: 15th Oct 2011 03:58
Okay, thanks Brendy boy.

This little piece of code confused me:
Da_Rhyno
15
Years of Service
User Offline
Joined: 25th May 2011
Location:
Posted: 15th Oct 2011 04:02
Brendy boy - I tried what you just said and it didn't work.

Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 15th Oct 2011 05:42 Edited at: 15th Oct 2011 05:43
i couldn't compile the code, you areen't using the newest version of BBB gui plugin. Check the few last pages, there's somewhere newer update which isn't completed yet thats why it isn't attached to the first post of the BBB gui thread.

After changing the code to be able to compile it i realised that GET CLICKED BUTTON command has a bug -> it doesn't work if the button is on the dbpro window. You can use BBB Button_Clicked(button_handle) command instead. It will return 1 if the specified button is clicked, otherwise 0.

Here is the working code (you'll need the newset version of the BBB GUI)


Da_Rhyno
15
Years of Service
User Offline
Joined: 25th May 2011
Location:
Posted: 15th Oct 2011 05:50
Thanks, so do I have to download the newer releases? Just wondering.
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 15th Oct 2011 06:06
Quote: "Thanks, so do I have to download the newer releases?"

well, it is advisable but for the above code isn't necesary but then you'll have to figure out what was the syntax for BBB Button_Clicked command in the version you use. I don't have it anymore so i can't tell you. Check in the keyword file. I can only help you if you're using the newest version because that's the only version that is present on my computer

Da_Rhyno
15
Years of Service
User Offline
Joined: 25th May 2011
Location:
Posted: 15th Oct 2011 06:40 Edited at: 15th Oct 2011 07:49
Thanks! BTW would you recommend the BBGUI Window designer or is it not fully compatible?

EDIT I just tried BBBGUI Window Designer 1.2 with the most recent version of BBB GUI (your last download in your thread). I called GUI_Init(), and then ran the program and it crashed.
Brendy boy
20
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 16th Oct 2011 01:47
Quote: "would you recommend the BBBGUI Window designer or is it not fully compatible?"

if you don't get around with all the commands and parameters BBBGUI provides then Window designer is highly recomended and i believe it is fully compatible with the last version of the BBBGUI

Quote: " I just tried BBBGUI Window Designer 1.2 with the most recent version of BBB GUI (your last download in your thread). I called GUI_Init(), and then ran the program and it crashed. "

For questions about Window designer you'll have to wait for response from it's author - Admiral MH

Admiral MH
15
Years of Service
User Offline
Joined: 10th Feb 2011
Location: TX, USA
Posted: 16th Oct 2011 08:26
Quote: "EDIT I just tried BBBGUI Window Designer 1.2 with the most recent version of BBB GUI (your last download in your thread). I called GUI_Init(), and then ran the program and it crashed. "


Without code I don't know what could be the problem, but my guess would be that you did not include "Start BBB GUI" command at the start of your program. If that is not the problem, then you might want to post the code.

Quote: "i believe it is fully compatible with the last version of the BBBGUI"


That is correct. The program uses latest version.

As a side note, BBB GUI Windows Designer 2.0 is in development and should be ready in 1-2 months.

Da_Rhyno
15
Years of Service
User Offline
Joined: 25th May 2011
Location:
Posted: 17th Oct 2011 05:05
Awesome! I'm running into issues though where the controls don't redraw...

Admiral MH
15
Years of Service
User Offline
Joined: 10th Feb 2011
Location: TX, USA
Posted: 17th Oct 2011 20:47
Quote: "I'm running into issues though where the controls don't redraw..."


Add the WS_CLIPCHILDREN style to your project window, then the controls should draw correctly.


Login to post a reply

Server time is: 2026-07-10 04:20:24
Your offset time is: 2026-07-10 04:20:24