TOPIC: ToolBarControl inside a TabsControl
#1099
ToolBarControl inside a TabsControl 2 Years, 6 Months ago
i am not able to trap the "On_xxx" commands of a ToolBarControl buttons
inside a TabsControl. But it is possible to trap the "Drop_xxx" command

this is my code:
The buttons of Toolbar1, positioned as standard at the top of a window,
are all trapped exactly.

The buttons of Toolbar2 are not trapped. Only the "Printer dropdown"
button is exactly trapped

Code:


Controller
{
New(){
 .tabs= .Vert.Tabs
 .tab0= .tabs.WndPane  //tab 0 handler
 .Redir('On_Save', this)
 .Redir('On_Find', this)
}
Commands:
((Exit,"Ctrl+Q"')
(Save "Ctrl+S"')
(Find)
(Print)

)
 Controls:
(Vert
(Toolbar Save, "", (Print drop:true) Find name:'Toolbar1')
//
(Tabs
  (Vert name:"Vt0"
(Toolbar Save, "", (Print drop:true) Find name:'Toolbar2')
  Tab: "Tab0"')
//
  (Vert name:"Vt1"
(Field)
  Tab: "Tab1"')
constructAll:false,themed:true)
)
Menu:
(("File","","Exit"'))
//
On_Save(){
 Print('On_Save')
}
On_Find(){
 Print('On_Find')
}
Drop_Print(r){
 Print('Drop_Print')
}

}




there is a solution?

thanks in advance

Claudio
 
 
#1110
Re:ToolBarControl inside a TabsControl 2 Years, 6 Months ago
The ToolBarControl will send message to the Drop_xxxx method when "drop" is true. Normally we don't put toolbar inside a TabControl and it may not handle the click actions directly. When the focus is on the tab0, you will find the commands (i.e. Ctrl+S) will goes to the On_xxxx method. We will look into this issue to see is there a way to deal with this or we need improve our code. Thanks.