MDI-Gadgets and Tab-cycling

Just starting out? Need help? Post your questions and find answers here.
Sven
User
User
Posts: 20
Joined: Sat Mar 11, 2006 6:46 pm

MDI-Gadgets and Tab-cycling

Post by Sven »

While using this snippet:

Code: Select all

  #Main = 0
  #MDIChild = 1
  If OpenWindow(#Main, 0, 0, 400, 300, "MDIGadget", #PB_Window_SystemMenu|#PB_Window_ScreenCentered|#PB_Window_SizeGadget|#PB_Window_MaximizeGadget)
    If CreateGadgetList(WindowID(#Main)) And CreateMenu(#Main, WindowID(#Main))
      MenuTitle("Menu index 0")
      MenuTitle("MDI windows menu")
        MenuItem(0, "self created item")
        MenuItem(1, "self created item")
        
      MDIGadget(0, 0, 0, 0, 0, 1, 2, #PB_MDI_AutoSize)
        For k.w = 0 To 3
          AddGadgetItem(0, #MDIChild + k, "child window")
        Next
        ; CreateGadgetList(WindowID(#MDIChild))
        
          ; add gadgets here...
      UseGadgetList(WindowID(#Main)) ; wir gehen zurück zur Gadgetliste des Hauptfensters
    EndIf
    RemoveKeyboardShortcut(#Main, #PB_Shortcut_F6)
    
    Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
  EndIf
cycling the child-windows with >Tab< is not possible, it only switches between the last and current selected window. >Shift-Tab< cycles right backwards all childs.

Cycling forward all childs is done with >F6<, but one can not remove >F6< from the shortcut-list (while >Tab< and >Shift-Tab< can be removed) to prevent cycling the childs if using F6 for an user-defined command.

Is this a Win restriction? Using WinXP / PB4beta7 / 8.

Sven
User avatar
Michael Vogel
Addict
Addict
Posts: 2797
Joined: Thu Feb 09, 2006 11:27 pm
Contact:

Post by Michael Vogel »

Hard to say, microsofts own programs do not use MDIs (e.g. Winword) or using the tab for other things (w.g. Excel)...

What I saw, is that you need 4 times Shift-Tab in your program to rotate through the 3 windows...
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

The Tab key is not supposed to work between MDI childs. This is corrected now.
It now only changes the tab inside a mdi child, not between them.

As for the F6: Actually the standard way to switch MDI childs is Ctrl+F6,
which even appears in the SystemMenu of all MDI childs. The reason why
F6 alone worked as well was a bug and is now fixed.

So Ctrl+F6 is now the only key to switch MDI windows. It cannot be removed,
because it would be odd to have a SystemMenu entry that sais "Ctrl+F6", and the
key actually performs a totally different operation.
quidquid Latine dictum sit altum videtur
Edwin Knoppert
Addict
Addict
Posts: 1073
Joined: Fri Apr 25, 2003 11:13 pm
Location: Netherlands
Contact:

Post by Edwin Knoppert »

Don't forget the Ctrl+Tab which let's you switch as well.
Post Reply