GUI, How do you do this? (Image Included)
Blitz3D Forums/Blitz3D Beginners Area/GUI, How do you do this? (Image Included)
| ||
Well I was just wondering how do people do this in their program? Code Example would be nice :) ![]() |
| ||
Do what exactly? |
| ||
See the image, theres like a rectangle and some text at top left, thats what I want to do and add stuff in it... I wana know how to do it? |
| ||
BlitzPlus doesn't let you do this properly unfortunately. You can of course make your own with a panel and a label. |
| ||
how? how! how? Example ?? ne? ne? |
| ||
[pimp]The next version of GUIde will allow you to create these. It will also have menu support and divider lines! Screenshot: [/pimp] |
| ||
Try looking at the CreatePanel() and CreateLabel() commands. Press F1 twice. |
| ||
Ok Im gonna look it up.. No offence Wiebo but it just pisses me off when people advertise there programin help post, I wouldnt mind if it was free but paid programs come'on. You need help now, you dont wana pay for a program to make the stuff you wana do... If i wanted a GUI editor I would just make one. |
| ||
Nope still got no idea how you do it :| |
| ||
If i wanted a GUI editor I would just make one. It wouldn't have frames with labels though would it :) o offence Wiebo but it just pisses me off when people advertise there programin help post It's a solution to the problem. It may not be the solution you wanted but he is only trying to help (...and make a bit of cash from an app he spent time making) It's easy. Create a frame. Create a label. Put the label in the correct position on the frame. Simple |
| ||
I thought of that but sunken border doesnt look the same :| Ill figure it out soon hopefully else Ill just send an email to my sensei soja :D |
| ||
/Agrees with Binary_Moon. If you don't like it, then just ignore it. In his own way, Wiebo is trying to be helpful. Sooner or later we'll all upset someone without meaning to. |
| ||
No offence Wiebo but it just pisses me off when people advertise there programin help post, I wouldnt mind if it was free but paid programs come'on. It's definitely less offensive than people not bothering to look at supplied samples and help files, BEFORE asking questions on the forum. Don't you think? God forbid that anyone should ever make a living from hard work! |
| ||
If you can't find what you are looking for in the offline help files then check the online ones http://www.blitzbasic.com/bpdocs/command.php?name=createpanel&ref=goto Have a look at the comments for the optional style property A lot of blitz+ gadgets have an optional style property that isn't mentioned in the docs. It's well worth having a play to see what they do. A hint - press f1 when the cursor is on a command (in the ide) and the command parameters will appear in the status bar. This works for all blitz commands (including 'undocumented' ones - like handle and object) and will show you what gadgets use the style parameter. |
| ||
BTW there was no need to swear - and since you use the help files so much why don't you visit the accounts section and get the latest update (from the product updates) :) |
| ||
try this:; Create a window and some labels win=CreateWindow("Test Labels",100,100,200,150,0,17) CreatePanel(5,16,180,100,win,1) CreateLabel(" Label ",15,10,32,20,win,0) ; The simplest event loop possible! Repeat Until WaitEvent()=$803 End ; bye! it doesnt really look like the aboves one uh? Note: Im always up to date :P, and yeah no need to swear but i got a bit pissed. |
| ||
it doesnt really look like the aboves one uh? No it doesn't. Ok - how about you create a canvas then draw a sunken border around the outside. It isn't as good as a panel since resizing the window will mess up the canvas buffer but it would be a start. The only other way I can think of doing it would be userlibs but that seems a bit of a cop out. I must admit I had thought the style thing would work, but I didn't test it... my bad. |
| ||
Here i figured out some way of doing it:; Create a window and some labels win=CreateWindow("Test Labels",100,100,200,150,0,17) CreatePanel(5,16,180,4,win,1) CreatePanel(5,120,180,4,win,1) CreatePanel(5,18,4,102,win,1) CreateLabel(" Label ",15,10,32,20,win,0) ; The simplest event loop possible! Repeat Until WaitEvent()=$803 End ; bye! Check it, I almost got it but the bottom bar need to be switched, got any idea on how i could do that? I thought of -4 but hmm.. doesnt work it disappears :( I just noticed that looking at the others i might not need to flip it, but it would have looked awesome tho :) |
| ||
SOLUTION FOUND EVERYONE, for thoses of you who wanted to know here it is: ; Create a window and some labels win=CreateWindow("Test Labels",100,100,200,150,0,17) CreatePanel(5,16,180,4,win,1) CreatePanel(5,18,4,102,win,1) CreatePanel(5,118,180,4,win,1) CreatePanel(181,18,4,103,win,1) CreateLabel(" Label ",15,10,32,20,win,0) ; The simplest event loop possible! Repeat Until WaitEvent()=$803 End ; bye! Hopefully one day we won't have to do it this way, when Mark impliment something to make this easyer ^_^ Maybe hes working on more features for the GUI, I sure hope so ^^ Note: the lines look kind of fat but I wasnt able to set them under 4 else they disapear. |
| ||
Kaisuo: Sorry if I pissed you off, that wasn't my intention. It's rather easy to create the effect you need, and 4 panels for such a simple effect is just way overdone... Also, it will probably result in drawing errors as b+ doesn't like overlapping gadgets. |
| ||
http://www.blitzbasic.com/codearcs/codearcs.php?code=830 This is the way to do it :D |
| ||
That is a lot of code! Why not create a canvas, draw the box and label and place gadgets on the canvas? |