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.

Work in Progress / BBB Gui Plugin

Author
Message
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 13th Jan 2013 21:03
when you're setting window style like this:
bbb window_setstyle w,ws_caption
you are replacing all the previous window styles with ws_caption.
Some of that previous styles may be necesary for labels to show up.

Try using it like this:
bbb window_setstyle w,bbb window_getstyle(w)||ws_caption

basjak
12
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 13th Jan 2013 22:51 Edited at: 13th Jan 2013 22:57
It didn't work. I need a window with no control buttons.

or, maybe am using the no skin DLL. tomorrow I will use the uskin one and place the result.

Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 13th Jan 2013 22:56
what didn't work? labels still don't show?

Grasmann
14
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 22nd Jan 2013 07:59 Edited at: 22nd Jan 2013 10:22
Is there currently any way to identify the selected rows in a listview if multiselection is used?

I found a way to iterate through selected items(rows) in the listview control:



As far as I'm understanding this you can either check like this:


Or like this:


I'm not exactly sure, but it shouldn't matter, while I have a better feeling with the second method.
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 22nd Jan 2013 12:58
Quote: "Is there currently any way to identify the selected rows in a listview if multiselection is used?"

no

you should check for states like this:

state=BBB APP_SENDEVENT(view_list_content, LVM_GETITEMSTATE, db, LVIS_SELECTED)
if state and LVIS_SELECTED
//this item is selected
endif

Items could have several states and if you check for only one of them (e.g. LVIS_SELECTED) you have to use logical operator 'and' because what you're actualy doing is checking if a bit flag is set to 1 or 0

Grasmann
14
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 23rd Jan 2013 08:55 Edited at: 23rd Jan 2013 13:11
EDIT:
I kind of solved my problems.
I just remove the focus from the listview in the main loop IF it has the focus.
Instead of selection I'm using the checkboxes now.



This way I can use the listview and select different items in it and still get WM_KEYDOWN messages from the main form.

EDIT2:
Is it possible to have a listview with both text and images?
Somehow I can't get it working XD.
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 23rd Jan 2013 17:34
Quote: "Somehow I can't get it working XD. "

i don't know. Haven't looked at bbb gui source code in a while so i don't remember if that feature is implemented, but probably it isn't

Grasmann
14
Years of Service
User Offline
Joined: 1st Sep 2008
Location:
Posted: 25th Jan 2013 14:17 Edited at: 25th Jan 2013 14:49
I just found out how to check items ( set them as checked ) programmatically.



I just tested this quick and it seems to work for me.
To be able to use ALLOC and POKE command you will need IanM's Matrix1Utils plugins collection

Explanation:
The LVITEM structure needed to send this message to the listview is a structure of 34 bytes with different values.
Luckily for my purpose only state and statemask is needed, so I'm creating this structure in an empty state and poke in those two values.
The message itself is expecting a pointer to the structure, in other words the adress in memory, which is returned by the ALLOC command.
Mirks
10
Years of Service
User Offline
Joined: 12th Aug 2012
Location:
Posted: 18th Feb 2013 03:47
When you create a label or radio button with BBB GUI it has a light grey background. Is there any way to make the background transparent? I know it might have a performance impact, but I'm just making a simple tool, so in my case that doesn't matter.
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 18th Feb 2013 09:40
Quote: "When you create a label or radio button with BBB GUI it has a light grey background. Is there any way to make the background transparent?"

no, all controls are non-transparent and that can't be changed easily, it would require significant rewriting of the plugin and lots of additional code

Concept Games
15
Years of Service
User Offline
Joined: 20th Nov 2007
Location: Tucson, Arizona
Posted: 21st Apr 2013 02:31
Any progress on this plugin? Really looking forward to a lot of the planned features! Mainly the syntax highlighting! Thanks for creating such a great plugin Brendy, and I hope this gem doesn't die out!

Hmm...
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 22nd Apr 2013 03:09
no, this isn't dead but... I don't have time to work on this so development of this plugin is paused indefinitely

Concept Games
15
Years of Service
User Offline
Joined: 20th Nov 2007
Location: Tucson, Arizona
Posted: 24th Apr 2013 11:38 Edited at: 24th Apr 2013 11:39
Glad to hear the project isn't dead! In the meantime I do have a question that I hope you can answer. I am trying to make some labels that have both a colored background and text to match the background of my window (see attached image.) Normally, I'd think using 'bbb window_setcolor' would work (since essentially all controls are just windows.) But alas, I cannot seem to get it working - is this currently possible or no?

NOTE: Ultimately, i'd like for the label background to be black - and the text white.

Thanks!

Hmm...

Attachments

Login to view attachments
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 24th Apr 2013 20:58
Quote: "is this currently possible or no?"

no, color cannot be set for anything except windows.

Setting color would require significant changes in the code of the plugin so that cannot be implemented easily and therefor isn't a planned feature

thenerd
13
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 21st May 2013 03:31 Edited at: 21st May 2013 03:43
Hey, could someone help me figure out how to create a child window and set it to sit on the right or bottom of the main window? I've looked through this entire thread and can't seem to find a solution. I know it has something to do with EX styles, but besides that every style option I've tested out hasn't worked properly. I'm probably missing something obvious...

[EDIT] To clarify, I'm trying to do something that has multiple side panels in the main window, justified to the right / left / bottom. I haven't seen any examples where BBB elements besides the menus are actually rendered on the root window. How would I go about this?

This is the first good example picture I could find. note the two divided panels on the side. I know once I have the right-justified main window, I can further divide that up using Splitters. I just don't know how to render the main side panel window onto the dbpro window with the correct layout.



Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 21st May 2013 06:54
i'm not sure what exactly are you asking.

If you want to put any control on main dbpro window use dbpro window handle as parent window. You can get dbpro window handle using BBB App_GetDbproWindow() command.

If you're asking how to set a child window on the right side of it's parent window (a.k.a. dock it to a parent window) thats' not possible at the moment.
You'll have to calculate the position manualy and update it every time you resize your parent window.

thenerd
13
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 21st May 2013 13:58 Edited at: 21st May 2013 14:00
I don't think I explained it well. We might be talking about two different things at the moment. What I'm trying to do is make a child window (within the dbpro window) that always stays on the right of the layout. Forgive me if you're already talking about this. The word "docking" gives me the impression that the window is outside of the main dbpro window. I'm trying to do this from inside the window, the blue box represents where I am trying to have the justified window fit using styles or EX styles but I can't seem to figure it out. I hope it's possible



Your plugin works great by the way, it just has a learning curve

Attachments

Login to view attachments
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 22nd May 2013 03:20
yes, that is docking and no it can't be done automaticaly using WINDOW_EX flag. You'll have to calculate window position manualy and update it when necessary

thenerd
13
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 22nd May 2013 03:22
Ahh I was worried that was the case. Thanks I understand how to do that.

Carl5163
10
Years of Service
User Offline
Joined: 21st Apr 2012
Location:
Posted: 23rd May 2013 21:12
Hi I am attempting to understand the examples included with your plugin, and my only problem is I don't understand this part


is it something I'm missing in the if statements? Because


doesn't make sense to me. Thanks, and love the plugin.
Chris Tate
DBPro Master
14
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 24th May 2013 11:45
I'm not the star who created the plugin; but I do understand what is happening in the code.

The get state functions are compared with the BST constants. The And operator is used. (In this case it is the logical and instead of the binary and &&; the difference is the && has lower precedence.)

Because windows forms controls can return more than one state; for example, a button can be pushed, checked and focused at the same time. But instead of creating separate functions for each individual property; one is used to return them all.

A simple way of demonstrating a binary comparison, consider this:

Quote: "11111 And 00000 = False (0)"

None of the bits in the first operand are switched on in the second

Quote: "11111 And 11000 = True"

At least one the bits in the first operand are switched on in the second

Quote: "6 And 2 = True"

At least one the bits in the first operand are switched on in the second; here binary is represented in integers.

Now ignore the fact that BST constants are hexadecimal numbers; and imagine them as binary switches. When the switches match, the strings in the example are concatenated.

Carl5163
10
Years of Service
User Offline
Joined: 21st Apr 2012
Location:
Posted: 24th May 2013 23:20
Thanks a lot! That really helped it makes perfect sense now i did not think to try comparing the numbers in binary.
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 25th May 2013 01:15
@Carl5163
Chris Tate explained it nicely, thanks Chris

Carl5163
10
Years of Service
User Offline
Joined: 21st Apr 2012
Location:
Posted: 25th May 2013 21:23
I have one more question. Is it possible to delete all controls in a window without deleting the window? Or do i have to delete each control manually?
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 26th May 2013 07:45
Quote: "Is it possible to delete all controls in a window without deleting the window?"

no

Quote: " Or do i have to delete each control manually? "

yes

Mobiius
Valued Member
19
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 28th May 2013 20:59
Hello, I'd like to create a UI editor which uses the DBPro window. I'd like to create a window with some form elements on it and have the DBPro window display on top of this window, and positioned at a certain place.

I.E, like the picture TheNerd posted above.

I know I need to manually position the DBPro window at a certain place, but it's currently being drawn behind the BBB window. How can I change the ZOrder of the DBPro window so it is on top of the BBB window?

This is the code I'm using to create the window.


This is my current project, check it out! [url]forum.thegamecreators.com/?m=forum_view&t=204576&b=8[/url]
This is my website, check it out! [url]http:\\www.TeamDefiant.co.uk[/url]
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 29th May 2013 13:54
if you want to put dbpro window inside BBB window then dbpro window needs to be a child of that bbb window. Also you will need to convert dbpro window to child window.

Try adding WS_CHILD style to dbpro window and see if that helps

Mobiius
Valued Member
19
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 29th May 2013 17:18 Edited at: 29th May 2013 18:10
Thanks for that, but is there a way to ensure that the DBPro window is always on top of and aligned with the BBB window, without resorting to manual positioning and zorder commands, which only take effect after you've finished moving the BBB window?


**EDIT**
I use this code to create the forms, but now the DBPro window will flicker between being at 0,0 to another position on the form, and back again. I can't show a video of it as fraps will only record the DBPro window, and not the parent window.

Help! Lol


This is my current project, check it out! [href]forum.thegamecreators.com/?m=forum_view&t=204576&b=8[/href]
This is my website, check it out! [href]http:\\www.TeamDefiant.co.uk[/href]
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 30th May 2013 01:27
instead of set window layout use this:
BBB Window_SetStyle DBPro_W, BBB Window_GetStyle( DBPro_W )
st=BBB Window_GetStyle( DBPro_W ) and (not (WS_BORDER || WS_DLGFRAME || WS_THICKFRAME))
BBB Window_SetStyle DBPro_W, st||WS_CHILD

Mobiius
Valued Member
19
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 31st May 2013 01:25
That's sorted it. Thanks.

This is my current project, check it out! [href]forum.thegamecreators.com/?m=forum_view&t=204576&b=8[/href]
This is my website, check it out! [href]http:\\www.TeamDefiant.co.uk[/href]
Mobiius
Valued Member
19
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 3rd Jun 2013 17:39 Edited at: 3rd Jun 2013 18:58
I have another slight issue. I'm creating a number of Group Boxes, but one of them will not use the same font as the others.



As you can see, everything has the same font except the Name group box. (The command to set the font has been set twice in case something internally changed it, but it hasn't helped.)

*EDIT* (Updated picture to show additional issues)
Also, the group box text is being clipped, and is missing the last few characters off. Any ideas whats causing that?

This is my current project, check it out! [href]forum.thegamecreators.com/?m=forum_view&t=204576&b=8[/href]
This is my website, check it out! [href]http:\\www.TeamDefiant.co.uk[/href]
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 6th Jun 2013 20:06
Quote: "I have another slight issue."

unfortunately I'm quite aware of that issue and all my tries at fixing it have failed

At the momet i don't have any spare time to spend fixing it so this issue will have to wait for some better times

Mobiius
Valued Member
19
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 6th Jun 2013 20:53
Thank you for a reply. At least I know it's nothing I'm doing wrong. Since I'm not planning on selling my UI Editor, (And I don't care too much even if I was!) I'm not too fussed about a few font troubles.

It only seems to affect the titles of group boxes, within group boxes so far.

This is my current project, check it out! [href]forum.thegamecreators.com/?m=forum_view&t=204576&b=8[/href]
This is my website, check it out! [href]http:\\www.TeamDefiant.co.uk[/href]
Mobiius
Valued Member
19
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 7th Jun 2013 00:10
Sorry for double posting (need the thread to be blue) but I have another question.

I've created a version of the Visual Studio Input box, but when pressing enter obviously nothing happens. Is there a way that when an editbox is active, when pressing enter will perform the same action as an OK button. (Or simply knowing if the editbox is the active control)

It's very annoying typing and not having the inputbox close when enter is pressed. lol

This is my current project, check it out! [href]forum.thegamecreators.com/?m=forum_view&t=204576&b=8[/href]
This is my website, check it out! [href]http:\\www.TeamDefiant.co.uk[/href]
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 7th Jun 2013 21:00
Quote: "Is there a way that when an editbox is active, when pressing enter will perform the same action as an OK button. (Or simply knowing if the editbox is the active control)"


BBB App_GetFocusWindow will give you the handle of the control which has the focus.

When you press enter editbox will lose the focus, you just need to detect that change and that's it!

Mobiius
Valued Member
19
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 10th Jun 2013 17:46
Quote: "BBB App_GetFocusWindow will give you the handle of the control which has the focus.
When you press enter editbox will lose the focus, you just need to detect that change and that's it!"


Got it working now, thanks.

This is my current project, check it out! [href]forum.thegamecreators.com/?m=forum_view&t=204576&b=8[/href]
This is my website, check it out! [href]http:\\www.TeamDefiant.co.uk[/href]
Mobiius
Valued Member
19
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 14th Jun 2013 00:31
Any idea on how to create a modal, non resizable window?

I'm using the following, it removes the minimise and maximise buttons, but it's still sizable.



This is my current project, check it out! [href]forum.thegamecreators.com/?m=forum_view&t=204576&b=8[/href]
This is my website, check it out! [href]http:\\www.TeamDefiant.co.uk[/href]
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 14th Jun 2013 01:19
have a look at the window example - there's a tool window. That's what you need

Mobiius
Valued Member
19
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 15th Jun 2013 15:29
That's done it! Cheers.

This is my current project, check it out! [href]forum.thegamecreators.com/?m=forum_view&t=204576&b=8[/href]
This is my website, check it out! [href]http:\\www.TeamDefiant.co.uk[/href]
Mobiius
Valued Member
19
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 15th Jun 2013 21:35
Hello, I'm back with yet another query.

This time it's on deleting TreeView nodes.

Whenever I call the following command: BBB Treeview_DeleteItem, I get an "Application has stopped working" crash.

I've tried selecting Node ID 1 in case it crashes when the node is selected, but it still crashes.

What silly mistake have I made this time! lol

This is my current project, check it out! [href]forum.thegamecreators.com/?m=forum_view&t=204576&b=8[/href]
This is my website, check it out! [href]http:\\www.TeamDefiant.co.uk[/href]
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 15th Jun 2013 21:45
make an example which i can compile and try it myself

Mobiius
Valued Member
19
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 15th Jun 2013 21:59
I knocked up a demo using the treeview demo, and it worked, so it must be something about my program which is causing it to crash...

This is my current project, check it out! [href]forum.thegamecreators.com/?m=forum_view&t=204576&b=8[/href]
This is my website, check it out! [href]http:\\www.TeamDefiant.co.uk[/href]
GIDustin
14
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 24th Jul 2013 17:59
I just compiled the "Menus" example to see how that worked. One thing I noticed is that when the user has a menu opened, DBPro stops running until the menu is close (i.e. the box in the background stops spinning). Is there any way to make that not happen?
Brendy boy
17
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 25th Jul 2013 01:29
no, menus are modal controls which stop program execution until user makes it's choice

Login to post a reply

Server time is: 2022-11-27 05:20:25
Your offset time is: 2022-11-27 05:20:25