Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Page with two listboxes and no other controls on it.
Message
De
03/07/2004 00:24:39
 
 
À
02/07/2004 17:19:54
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00920333
Message ID:
00920393
Vues:
17
This message has been marked as a message which has helped to the initial question of the thread.
>We have some pages that only have listboxes on them and nothing else. Each listbox may have 1 or more items. Because the currently selected item in the listbox is highlighted in both boxes, you cannot tell which control currently has the focus easily. Is there anyway to change the means of highlighting to more easily point out to the user which listbox has the focus? I have added comments in the statusbar text property that doesn't seem to be visible enough and the highlighted row suggests otherwise.

hi Tracy,

As it happens, I've had that problem a few days ago

You can play with the ColorSource in the Got/LostFocus. I have left that out, the control appears disabled with ColorSource = 1


I have, as some suggested, used a shape

Add a property FocusMark
.T. = show border on get/lostfocus
.F. = do not do anything
&&& init

if( !DoDefault() )
	return FALSE
endif

do case
case empty(this.FocusMark)

otherwise
	this.FocusMark = sys(2015)
	=this.Parent.AddObject(this.FocusMark, 'Shape')
	
	do case
	case type('this.Parent.' + this.FocusMark ) == T_OBJECT
		this.FocusMark = 'this.Parent.' + this.FocusMark
		
		local obj
		obj = eval(this.FocusMark)
		
		#define THICKNESS 2
		obj.BorderColor = rgb(0,0,255)
		obj.BackStyle = 0
		obj.BorderWidth = THICKNESS 
		=obj.Zorder(1)

		obj.Move(this.Left - THICKNESS, this.Top - THICKNESS, this.Width + 2*THICKNESS, this.Height + 2*THICKNESS )
		obj.Visible = FALSE	&& set on/off in got/lostfuvus
		
		#undefine THICKNESS 
		
	
	otherwise
		this.FocusMark = FALSE
	
	endcase
endcase

&&& GotFocus
=DoDefault()

do case
case empty(this.FocusMark)

case type(this.FocusMark) <> T_OBJECT

otherwise
	store TRUE to (this.FocusMark + '.Visible')

endcase

&& LostFocus
=DoDefault()

do case
case empty(this.FocusMark)

case type(this.FocusMark) <> T_OBJECT

otherwise
	store FALSE to (this.FocusMark + '.Visible')

endcase
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform