Pushbutton in main window of xdemo

This forum is for eXpress++ general support.
Post Reply
Message
Author
skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Pushbutton in main window of xdemo

#1 Post by skiman »

Hi,

I want some pushbuttons in the main windows of my application. I did a test with the XDEMO.PRG source.

I added the following code in xdemo.prg on line 190.

Code: Select all

@ 50,50 dcpushbutton ;
		Size 150,150 ;
		Parent oDialog ;
		Caption "TESTING" ;
		ACTION {|o| msgbox("I'm clicked") } pixel
This shows the button in the screen.
xdemo1.PNG
xdemo1.PNG (29.55 KiB) Viewed 10872 times
When I select an option in the menu, the button stays there as you can see below.
xdemo2.PNG
xdemo2.PNG (33.68 KiB) Viewed 10872 times
How can I prevent this?
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Pushbutton in main window of xdemo

#2 Post by rdonnay »

Try this:

Code: Select all

@ 50,50 dcpushbutton ;
      Size 150,150 ;
      Parent oDialog:drawingArea  ;  <<<<<<<<<<<<<<<<<<<<<
      Caption "TESTING" ;
      ACTION {|o| msgbox("I'm clicked") } pixel
The eXpress train is coming - and it has more cars.

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Pushbutton in main window of xdemo

#3 Post by skiman »

Hi Roger,

I just tested your suggestion, but it doesn't work.

Error BASE/2266
Description : Receiver of message is not an object.
Operation : drawingArea
Thread ID : 1

I'm trying to create some kind of dashboard in the main screen.

Any other suggestion?
Best regards,

Chris.
www.aboservice.be

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Pushbutton in main window of xdemo

#4 Post by rdonnay »

Sorry Chris. I didn't look closely at what you were doing.

I put the same code in my XDEMO.PRG and see the problem.

Remove the "PARENT oDialog" from the DCPUSHBUTTON command.
The eXpress train is coming - and it has more cars.

skiman
Posts: 1199
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: Pushbutton in main window of xdemo

#5 Post by skiman »

Hi Roger,

That works. I tried a lot of things, but I didn't remove the parent clause.
Best regards,

Chris.
www.aboservice.be

Post Reply