Toolbar with Custom Controlback to main page |
What is the Toolbars with Custom Controls?
Is a further enhancements of the standard Visual Prolog toolbars.
Now programmer can create toolbar with any custom control
You will need custom controls created in some dummy window to have them referenced inside a project. You also will need to define custom control class handlers. After that you can use these objects inside a toolbars.
Simply change reference to toolbar support files in your project.
Download VIP 5.2 project source
Here is a code you need to place inside your project to have custom controls inside a toolbar.clauses
tb_custom_toolbar_Create(_Parent):-
ProgressCtrl = tb_custom(progress_bar_ctrl, % (Control
Id,
230, % Width (pixels),
"PROGRESS"),
DirCtrl = tb_custom(drive_path, % (Control Id,
250, % Width (pixels),
"set_dir"),
DateCtrl = tb_custom(date_control, % (Control Id,
250, % Width (pixels),
date_cc_class),
ifdef use_tbar
TbarWindow = toolbar_create(tb_moveable("",pnt(30,30)),0x808080,_Parent,
[tb_text(idt_sample1,tb_static,300,0,1,10,0x0,"This
is a sample toolbar with custom controls"),
new_row,
tb_text(idt_2,tb_static,150,0,1,10,0x0,"Directory
Control:"),DirCtrl,
new_row,
tb_text(idt_3,tb_static,150,0,1,10,0x0,"Progress
Bar Control:"),ProgressCtrl,
tb_ctrl(id_file_new,pushb,idb_new_up,idb_new_dn,idb_new_up,"Start
Timer;Start Timer",1,1),
new_row,
tb_text(idt_5,tb_static,150,0,1,10,0x0,"Custom
Date Control:"),DateCtrl
]),
enddef
toolbar_register(_Parent,"custom",TbarWindow),
ObjectWin = win_GetCtlHandle(TbarWindow, drive_path),
set_dir_SetProc(ObjectWin,dc_SetDirCallBack ),
true.
%END_TLB Custom Toolbar
Copyright 1998-2000 EDMGROUP (Australia)
Last Updated: 03/20/02