Project

General

Profile

Up

Tabs

This API allows to create, destroy and manage tabs controls.
A tabs control provides several tab.

API

Example

var A = 3;;
	
fun cbTabChange (obj, u, i)=
	_fooS strcat "tab " u;
	_fooS strcat "new tab selected : " itoa i;;

fun cbSize (o, tab, w, h)=
	_DELtab tab 2;
	_APPENDtab tab strcat "number " itoa A;
	++A;
	0;;

fun main ()=
	_showconsole;
	
	let _CRwindow _channel nil 300 50 800 600 WN_NORMAL "test tabs" -> win in
	let _CRtabExpand _channel win TAB_SHOWN -> tab in
	(
	_fooS if tab == nil then "TABS NOT CREATED" else "TABS CREATED";
	
	_ADDtab tab "number 1" 0;
	_ADDtab tab "number 2" 1;
	_ADDtab tab "number 3" 2;

	_SETtabSelected tab 1;
	_SETtabPadding tab 10 20;

	_CBtabChange tab @cbTabChange "changed";

	let _CRwindowInTab _channel tab 0 WN_CHILDINSIDE -> child in
	_CRbutton _channel child 5 50 250 200 0 "BOUTON CHILD 0";
	let _CRwindowInTab _channel tab 1 WN_CHILDINSIDE -> child in
	_CRbutton _channel child 5 5 250 200 0 "BOUTON CHILD 1";
	let _CRwindowInTab _channel tab 2 WN_CHILDINSIDE -> child in
	_CRbutton _channel child 50 50 250 200 0 "BOUTON CHILD 2";
	
	_CBwinSize win @cbSize tab;	
	0
	);;

Note

This APi is new; it is in beta yet.