Page 1 of 1

SortGadgetTabs LIB (Sort Gadgets Tab (z-order) of a window

Posted: Fri Feb 16, 2007 12:29 pm
by zikitrake
Ok, I was searching a method to the TAB order for gadgets on a Windoze application (http://www.purebasic.fr/english/viewtopic.php?t=14193), but more easly.

And here is my lib:

http://zikitrake.com/freeware/SortGadge ... taller.exe

Use:

Code: Select all

Procedure WIN_SAMPLE(title.s)
  OpenWindow(0, 0, 0, 300, 330, title, #PB_Window_SystemMenu | #PB_Window_ScreenCentered) 
  CreateGadgetList(WindowID(0))
  ButtonGadget(#PB_Any, 70, 10, 50, 20, "a Tab")
  ButtonGadget(#PB_Any, 150, 10, 50, 20, "b Tab")
  ButtonGadget(#PB_Any, 10, 10, 50, 20, "c Tab")
  ListIconGadget(#PB_Any, 10, 140, 200, 150, "d LISTICON Tab",100)
  StringGadget(#PB_Any, 5, 40, 200, 20, "e Tab")
  OptionGadget(#PB_Any, 10, 100, 100, 20, "f Tab")
  OptionGadget(#PB_Any, 10, 120, 100, 20, "f Tab2")
  ButtonGadget(#PB_Any, 140, 100, 50, 20, "g Tab")
  CheckBoxGadget(#PB_Any, 10, 70, 200, 20, "h Tab")
  
EndProcedure

WIN_SAMPLE("Press TAB (gadget UNsorted) - PRESS TAB")
Repeat: event = WaitWindowEvent():Until event = #PB_Event_CloseWindow

WIN_SAMPLE("Press TAB (gadget sorted) - PRESS TAB")
Ziki_GadgetTabOrder(WindowID(0))
Repeat: event = WaitWindowEvent():Until event = #PB_Event_CloseWindow


Posted: Fri Feb 16, 2007 2:59 pm
by zikitrake
updated: Now don't fails with ListIcon Gadgets

Posted: Mon Feb 26, 2007 5:51 pm
by zikitrake
Updated, now it can maintaining OptionGadgets groups