mIRC Homepage
Posted By: Ancyker Dialog menu to change dialog content - 27/07/03 03:29 AM
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?
Posted By: KingTomato Re: Dialog menu to change dialog content - 27/07/03 04:29 AM
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
Posted By: Ancyker Re: Dialog menu to change dialog content - 27/07/03 05:20 AM
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
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.
Posted By: Rich Re: Dialog menu to change dialog content - 27/07/03 01:10 PM
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.
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.
Posted By: Rich Re: Dialog menu to change dialog content - 27/07/03 03:54 PM
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.
Posted By: Ancyker Re: Dialog menu to change dialog content - 27/07/03 06:07 PM
But how to make the tabs change without clicking on them?
Posted By: RAIN Re: Dialog menu to change dialog content - 27/07/03 08:04 PM
You can do so with command
did -c dialogname idoftab
© mIRC Discussion Forums