|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hi guys!
Need someone to help me on this subject... >> Task: Menu/Toolbar system (JScript). I've already built a JS/CSS Toolbar Menu system, for my app. It suports multiple menus, each filled with "n" buttons; My goal here is to integrate in an app. a menu system like IE, or Word... >> Capabilities: Show/Hide Menu; Parse Button's State. So far, my menu sys. supports show/hide Menus & inside each menu, the buttons can assume 2 states : enabled or disabled. i'm "parsing" button state by paasing an array to a function, something like this: (assume that PassedArray = "0,0,1,1,0,1,0,0,1") // 0 = Disabled; 1= Enabled; function objHandleButtons(MenuID, PasssedArray) { //-- something like: for (var i=0;i<=PassedArray.lentgh -1;i++) { if (PassedArray(i) == 0) objButton(i).disabled = true; else objButton(i).disabled = false; HandleExceptions(MenuID, PassedArray(i)); } (...) //mnuValidateFilter(MenuID); } >> Nothing new, he?! I've used this for my project and it works fine, but... now i got 5 distinct menus, with button ranges from 4 to 11! Imagine the huge quantity of arrays i'm supossed to manage! For each button clicked i must have an array, to control wich other buttons are enabled or not, and not counting the exceptions handling... Example: For Menu 1, button 5 clicked: disable bts. 1,3,4,6; Enable all others. Exception: if Filter = true, enable but. 3 Got the picture? >> Main Goal: Menu/Button Manager. My goal here is trying to understand how "professional" software handles this kind of operations... I mean: imagine a software like MS Word -- im sure they got some king of algorithm to handle the (huge!) button clicks, states (on/off/multi), actions, etc. otherwise it would be a "pain-in-the-ass" trying to manage menus, right? Any ideias??? |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > == Toolbar Algorithm? == |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|