I'm having trouble grabbing the x and y coordinates of button using the functions x() and y() included in the fl/fl_widget.h file.
And how could i create a button in the space that is left vacated by the moved space?
Put the code you need help with here
void button_cb( Fl_Widget* obj , void* )
{
int positionx=x();
int positiony=y()
obj->resize(pxx,pyy,40,40)
obj->label( "OFF" );
pxx=positionx;
pyy=positiony;
//obj->resize( 0,0,40,40 );
obj->redraw();
}