Hello! Is there a way to remove the standard close button from the UI?
With best regards, Bjoern_Karpenstein - Thu Jul 02 03:43:50 EDT 2015 |
Re: Remove Close Button from DB mainDialog = create "Bla"
void do_nothing(DB x){}
void do_close (DB x){ hide x; destroy x; x = null }
DB mainDialog = create("Bla", styleNoBorder)
close ( mainDialog, false, do_nothing)
apply ( mainDialog, "Close", do_close)
realize mainDialog { setCenteredSize( mainDialog, 200, 200 ) }
show mainDialog
Enjoy ! |
Re: Remove Close Button from DB mainDialog = create "Bla" pommCannelle - Fri Jul 03 10:29:51 EDT 2015
void do_nothing(DB x){}
void do_close (DB x){ hide x; destroy x; x = null }
DB mainDialog = create("Bla", styleNoBorder)
close ( mainDialog, false, do_nothing)
apply ( mainDialog, "Close", do_close)
realize mainDialog { setCenteredSize( mainDialog, 200, 200 ) }
show mainDialog
Enjoy ! Hi! Thanks for your reply. But there is still a button with the label "close" on the bottom right of the window. How can i remove this? The user should not have the option to use a close button on the lower right.
With best regards, |
Re: Remove Close Button from DB mainDialog = create "Bla" Bjoern_Karpenstein - Mon Jul 06 04:38:29 EDT 2015 Hi! Thanks for your reply. But there is still a button with the label "close" on the bottom right of the window. How can i remove this? The user should not have the option to use a close button on the lower right.
With best regards, Hi Try to use: close (mainDialog, false, doClose); In this case you need a close-handler for the DB-Control. Best regards Wolfgang
|
Re: Remove Close Button from DB mainDialog = create "Bla" Bjoern_Karpenstein - Mon Jul 06 04:38:29 EDT 2015 Hi! Thanks for your reply. But there is still a button with the label "close" on the bottom right of the window. How can i remove this? The user should not have the option to use a close button on the lower right.
With best regards, o_O
yes ... this is the button i add with the line apply ( mainDialog, "Close", do_close)
(@ master Wolfgang: line 6 of my snippet ;) )
|
Re: Remove Close Button from DB mainDialog = create "Bla"
void onClose()
{
release(mainDialog);
}
close(mainDialog, false, onClose);
Function onClose will execute when the user clicks the X on the window. There is no close button. Just add the sixth line of code to your code after you call the create method on the mainDialog. |