Příklad

dim F    : File; 
dim Idx  : Word; 
dim Comm : Word; 
dim Col  : Word; 
dim S    : String; 
dim iSS  : Longint;
dim iSD  : Longint
dim iVS  : Longint

const cmSmaz = 150;
const cmTest = 151;

SRewrite(F, "", true); 
for Idx := 1 to 100 do 
  SPut(F, _SCount(F)+1, "0" + #203 + "0" + #203 + "ABCDEF " + #203 + _Str(Idx)); 
end 

WInit(10, 0,0,35,12, "Test", 7, 0); 
Ins_GListBox(10, 10, 01,01,35,10, ofSelectable, F, Select);
Ins_Button(10, 20, 01,11,10,13, "OK", cmOK, 1);
Ins_Button(10, 30, 11,11,20,13, "Smaž", cmSmaz, 0);
Ins_Button(10, 40, 21,11,30,13, "Test", cmTest, 0);

AddGLBCol(10, 10, "0_", 20, BROW_IMAGE + BROW_NOSORTARROW + BROW_NORESIZECOL); 
AddGLBCol(10, 10, "1_", 20, BROW_IMAGE + BROW_NOSORTARROW + BROW_NORESIZECOL); 
AddGLBCol(10, 10, "Test 1", 100, BROW_TEXT + BROW_SORTABLE); 
AddGLBCol(10, 10, "Test 2", 50, BROW_TEXT + BROW_SORTABLE + BROW_SEARCHABLE); 

_AddGLBOpt(10,10,GLBO_BMPCOLUMN,"\Bmp\Sorts.bmp", 16); 
_AddGLBOpt(10,10,GLBO_BMPHEADER,"\Bmp\Sorts_header.bmp", 16); 

DoneGLBCol(10, 10); 

_AddGLBOpt(10,10, GLBO_SORT, 4, false);
_AddGLBOpt(10,10, GLBO_SELCOLUMN, 4);

SetDataObj(10,10,78) 
WOpen(10); 
repeat 
  Comm := _Execute(10); 
  if Comm = cmSmaz then 
    GetDataObj(10,10,Idx); 
    SDelete(F, Idx); 
    ReLoadGLB(10,10); 
  else
    if Comm = cmTest then
      GetGLBInfo(10,10,GLBO_SORT, iSS, iSD);
      GetGLBInfo(10,10,GLBO_SELCOLUMN, iVS);
      Printup("Sort sloupec:",iSS," Sort směr:", iSD, " Vybraný sloupec:", iVS);
    endif
  endif 
until Comm = cmCancel; 

exit 

Select: 
  GetDataObj(10,10,Idx); 
  Col := _ActGLBCol(10,10); 
  S := _SGet(F, Idx); 
  if(Col = 1)then 
    call Check(S, 1); 
  else if(Col = 2)then 
    call Check(S, 3); 
  endif endif 
  Invalidate(10,10); 
return 

procedure Check(dim S : String; 
                    I : Byte) 
  if(S[I] = "0")then 
    S[I] := "1"; 
  else 
    S[I] := "0"; 
  endif 
  SPut(F, Idx, S); 
endproc