Пример программирования кнопок Назад В начало Вперед

В приведенном примере:

interface ButtonTest 'Button Test';
  show at (0,3,50,10);

create view
  var
	buttonState: string;;

parameters
  buttonState;

screen scrButtonTest;
  noTableNavigation;
  fields
	buttonState;
  buttons
	cmButton1, [fixing, icon testBmp1];
	cmButton2, default;
	cmState;
	cmSunken;
	cmRaised;
<<
Состояние кнопки FIXING: .@@@@@@@@@@@@@@@
<.	Fixing	.>   <.	Default   .>

<.	Get State	.>
<.	Set sunken   .> <.	Set raised	.>
>>
end;

handleEvent
  cmState: {
	if IsButtonPressed(scrButtonTest, cmButton1) then
	set buttonState = 'Sunken';
	else
	set buttonState = 'Raised';
  }
  cmSunken: {
	SetButtonPressed(scrButtonTest, cmButton1, true);
	set buttonState = 'Sunken';
	SetButtonIcon(scrButtonTest, cmButton2, 'TestBmp2');
  }
  cmRaised: {
	SetButtonPressed(scrButtonTest, cmButton1, false);
	set buttonState = 'Raised';
	SetButtonIcon(scrButtonTest, cmButton2, '');
  }
end;
end.

Версия

Атлантис 5.1.23.