Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (Grant), 999 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how to make a button open a new panel? #301777
12/14/09 06:42
12/14/09 06:42
Joined: Dec 2009
Posts: 71
N
ncc1701d Offline OP
Junior Member
ncc1701d  Offline OP
Junior Member
N

Joined: Dec 2009
Posts: 71
I want to make a button that when clicked on on my main inteface opens/unhides/shows(not sure what correct method is) a new panel with buttons on it.

From looking at the lite c workshop tuts I assume that it would work like the quit button only my function would be like

function opennewmenu()
{
}

instead of quit_program()

question is, being brand new to programming. What would I put in my function to open the new menu.
I would think a "wait" at least at first but what else?
I dont know if I am loading a new panel or just showing/unhiding one or what?
thanks for any guidance.

Re: how to make a button open a new panel? [Re: ncc1701d] #301780
12/14/09 08:51
12/14/09 08:51
Joined: Nov 2009
Posts: 43
Turkiye
M
Machera Offline
Newbie
Machera  Offline
Newbie
M

Joined: Nov 2009
Posts: 43
Turkiye
Code:
PANEL* your_panel =
{
button(.......,button_click_function,.....);
bla bla ....
flags = SHOW|OVERLAY;
}

function button_click_function()
{
your_panel.flags = OVERLAY;
}



clearly, flags parameters are changeable with another function.
hope it helps


Last edited by Machera; 12/14/09 08:52.
Re: how to make a button open a new panel? [Re: Machera] #301890
12/15/09 00:50
12/15/09 00:50
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
Originally Posted By: Machera
Code:
PANEL* your_panel =
{
button(.......,button_click_function,.....);
bla bla ....
flags = SHOW|OVERLAY;
}

function button_click_function()
{
your_panel.flags = OVERLAY;
}



clearly, flags parameters are changeable with another function.
hope it helps


your_panel.flags = OVERLAY will overwrite any other flags...

use your_panel.flags & SHOW; to set a panel visible
or set(your_panel, SHOW);
use reset(pnl, flag) to disable
or toggle(pnl, flag) to... well... toggle tongue

Re: how to make a button open a new panel? [Re: MrGuest] #301898
12/15/09 02:24
12/15/09 02:24
Joined: Dec 2009
Posts: 71
N
ncc1701d Offline OP
Junior Member
ncc1701d  Offline OP
Junior Member
N

Joined: Dec 2009
Posts: 71
Thanks that works Machera.
Mr Guest...thank you to. I will have to try your solutions when i know more on "toggle" "set" "reset" and how that works. Still learning basics.


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1