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

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

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

Post 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() :?:
have fun
Jimmy
franco
Posts: 921
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

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

Post by franco »

I think you should disable before hide, then enable before show.
this does not work.
All The Best,
Franco
Canada
franco
Posts: 921
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

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

Post 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.
All The Best,
Franco
Canada
User avatar
AUGE_OHR
Posts: 2117
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany

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

Post 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.
have fun
Jimmy
Post Reply