mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2003
Posts: 79
A
Ancyker Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Feb 2003
Posts: 79
Whats the easiest way to change the dialogs content via menu...

Example:
I have a veiw menu with several options, we will call them Op1 Op2 Op3 and Op4. I want to be able to click Op1 and the dialog change acordingly to allow those options, click Op2 and it changes to those, and so on.

You see, I dont want to write a dozen dialogs and just have it close and open them, thats some massize amount of code, and hiding and unhiding elements is very messy. Is there an easier way to do this?

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
well if you mean you don't want to replicate events, but keep common ones, you could call different tables witht he same name..

i.e.

dialog blah1 {
...code...
}
dialog blah2 {
}

then call wither as name "blah"
/dialog -m blah blah1
/dialog -m blah blah2

then you can keep the dialog events for table blah, not redreate for 1, 2, 3, etc


-KingTomato
Joined: Feb 2003
Posts: 79
A
Ancyker Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Feb 2003
Posts: 79
No i mean i want the menu to control the dialogs content

Veiw > Options
shows options in THAT dialog

Veiw > Logs
shows the log options, in THAT dialog

Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Honestly, this would be infinately more simple (or simpler) if you would create a tab for each option. What you want can be done, but requires you to first hide all the items there are on the dialog (did -h dname id1,id2,id3,id4,.....,idoblivion) and then unhide only those that are needed for the selected option. Again, tabs are easier. They were created for this stuff.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Dec 2002
Posts: 117
R
Vogon poet
Offline
Vogon poet
R
Joined: Dec 2002
Posts: 117
You can even set the tab x y w h so that its edge falls completely out of the dialog, that way you can hide/show all controls on a tab very easily, while the tab itself isn't even shown. That will look exactly the same as when you show/hide all the controls one by one.


$input(Me like stars, You too?)
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
That's not what he means. how then would you show these items when you select a certain mode. Compare it to the way windows uses tabs, that is what he wants. Or at least what he asks for. Pushing the itemsd outside the GUI will never make them visible.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Joined: Dec 2002
Posts: 117
R
Vogon poet
Offline
Vogon poet
R
Joined: Dec 2002
Posts: 117
I meant something like this:
Code:
+-------- tab control border ---------------+
|                                           | 
|          +-----dialog border------+       |
|          |                        |       |
|          |         [control]      |       |
|          |                        |       |
|          +------------------------+       |
|                                           | 
+-------------------------------------------+

so you place the tab outline outside the dialog, and the controls on the tab, but inside the dialog outline.
now you can hide a whole bunch of controls at a time using did -f from your menu, but the tab control isn't visible, only the controls on it are, so it looks as if you did -v/did -h all controls on 1 tab.


$input(Me like stars, You too?)
Joined: Feb 2003
Posts: 79
A
Ancyker Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Feb 2003
Posts: 79
But how to make the tabs change without clicking on them?

Joined: Dec 2002
Posts: 29
R
Ameglian cow
Offline
Ameglian cow
R
Joined: Dec 2002
Posts: 29
You can do so with command
did -c dialogname idoftab


Link Copied to Clipboard