Share Tips, Code Samples, etc. with the Visual Prolog community.
Steve Lympany
VIP Member
Posts: 56
Joined: 31 Mar 2001 23:01

Selecting a toolbar in taskwindow

Unread post by Steve Lympany »

If you have several toolbar designs and you want to display a particular one at runtime, here is the method (the code is placed in

Code: Select all

domains     tb_design=full;partial. facts     xtoolbar_showing:tb_design:=partial. predicates     set_correct_toolbar:() procedure ().     set_correct_toolbar:(tb_design) procedure (i). clauses     set_correct_toolbar():-         input_data_complete,!,         set_correct_toolbar(full).     set_correct_toolbar():-         set_correct_toolbar(partial).       set_correct_toolbar(TB_TYPE):-%no need to change         xtoolbar_showing=TB_TYPE,!.       set_correct_toolbar(full):-         vpiToolbar::remove(getVPIWindow()),         projectToolbar::create(getVPIWindow()).     set_correct_toolbar(partial):-         vpiToolbar::remove(getVPIWindow()),         toolbar_partial::create(getVPIWindow()).
This example shows switching between two toolbars - a "full" and a "partial", depending if the user has entered all the required data.
Post Reply