Page 1 of 1

Hide / Show : will it "Disable" / "Enable" Control also ?

Posted: Wed May 18, 2022 8:35 am
by AUGE_OHR
hi,

i do have 2 x Button on "same place" and change it from "Start" to "Exit" using "Hide" / "Show"

if i do a DblClick it "seems" me that 2nd Click will activate "wrong" Button
it work when click 2 x "slow", not like a DblClick

---

i found DISABLE/ENABLE EVENTS. will that help :idea:

is there a Sample how to use DisableProcessWindowsGhosting() :?:

Re: Hide / Show : will it "Disable" / "Enable" Control also ?

Posted: Wed May 18, 2022 3:31 pm
by franco
I think you should disable before hide, then enable before show.
this does not work.

Re: Hide / Show : will it "Disable" / "Enable" Control also ?

Posted: Thu May 19, 2022 10:17 pm
by franco
This will work. Hope it is want you where looking for.

Code: Select all


		   DEFINE BUTTON button_s
		          ROW 250
			  COL 110
			  WIDTH 100
			  HEIGHT 30
			  CAPTION "START"
			  TABSTOP .F.
			  ACTION  {||{Form_1.button_s.enabled := .f.}, {Form_1.Button_s.visible := .f.}, {Form_1.Button_x.enabled := .t.} , {Form_1.button_x.visible := .t.}} // THEN START ACTION
		END BUTTON



		   DEFINE BUTTON button_X
		          ROW 250
			  COL 110
			  WIDTH 100
			  HEIGHT 30
			  CAPTION "EXIT"
			  TABSTOP .F.
			  ACTION {||{Form_1.button_x.enabled := .f.} , {Form_1.Button_x.visible := .f.}, {Form_1.Button_s.enabled := .t.}, {Form_1.button_s.visible := .t.} ,{Form_1.Release}}
		END BUTTON



	END WINDOW
FORM_1.BUTTON_X.VISIBLE := .F.

Re: Hide / Show : will it "Disable" / "Enable" Control also ?

Posted: Fri May 20, 2022 12:18 am
by AUGE_OHR
hi Franco,
franco wrote: Thu May 19, 2022 10:17 pm This will work. Hope it is want you where looking for.
you are right,
i have "oversee" Property "enabled" of Button and other Control.