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 / BlueGui question

Author
Message
dark donkey
17
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 14th Dec 2007 15:51
Sorry to sound really noobish but i can figure some stuff out.

First ill explain what im doing. Im using BlueGui for my program I am using the rainbow editor to design the interfaces. My first question is concerning TreeViews. In the Rainbow editor i can find out how to put items in it. My second is concerning tool bars. I can set them up but i cant figure out how to get to see if a button was pressed. I tried like i did with buttons and put mad an event source mouse click then inside i put an event source for the global variable but that didn't work.

Also just another question i don't mind not being answered but will blue gui work in a 3d buffered screen?. I think it will but anyway.

Anybody got any ideas. And in tree views in code how would i set the options on it. And retrieve the one selected. Please answerer i have searched but BlueGui isn't widely used so i couldesnt find much for tool bars and treeviews. But i got stuff like the TGC toolbar and other various problems.

Thanks,
Dark Donkey
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 15th Dec 2007 13:11
- I don't think you can set the treeview items withing the editor. So I would advise doing it manually.

To add a treeview item:
handle = addTreeviewItem( handleTreeview, handleParentitem, image, text [, insertAfterItem] )
Where you can leave out the insertAfterItem, and make image 0 when you haven't got an image list linked to your treeview.

- You can detect the toolbar being clicked using the constant in the gui.dba that comes with BlueGUI:


- I never have had any problems regarding the 3D canvas of DBP and BlueGUI except when using transparency with windows (It seemed to flicker on my screen).

- Treeviews' items can be found using
handle = selectedTreeviewItem(handleTreeview)
If you want to search which item was pressed, you have to compare the handle returned to the handle of each item you created.

I usually work with arrays to make it easier:
for example:


I tried to put alot of remarks to understand it easier.

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
dark donkey
17
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 15th Dec 2007 16:20
Thanks Sven B, that really really helps . gonna go make my interface know i know how to handle tree views and getting a tool bar click.
dark donkey
17
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 16th Dec 2007 14:22
Okay im sorry for asking but.... My TreeView dosent work when i have 3d on. I have tried putting it on a panel but the panel or the treeview dosent show. Allthough i have a panel at the top with buttons on which shows up.
dark donkey
17
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 16th Dec 2007 18:00
Okay its fixed. I put a panel underneath it and made my tree view a child for it. Then i used Bring to front. But know i have one tidy problem. Its with getting the selected tree view item. My code is:



At first i thought my code was wrong but i used text to seen teh value and its always 0 .
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 17th Dec 2007 15:48
TVI will hold the HANDLE of your selected object, so you need to search which item holds that handle.

If you're using functions, make sure you use globals and recheck every name of the handles you used. That's all I can advise.

If your problem still occurs, I will need a little more code than one line to find the problem...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
dark donkey
17
Years of Service
User Offline
Joined: 4th May 2006
Location:
Posted: 18th Dec 2007 11:09
Well im gonna try it in a sec. Its just a bit hard to give you some code since there over 1k+ lines.
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 19th Dec 2007 12:49
Also another tip:

try to isolate the problem. Try to find the code block where the bug is by disabling it with remstart and remend.

It should limit the code you have to search.

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.

Login to post a reply

Server time is: 2024-05-03 19:05:43
Your offset time is: 2024-05-03 19:05:43