LonkeroAdministrator
(KiX Master Guru)
2002-12-02 12:19 AM
tabstop/setfocus/enabled - kixforms button weirdness

shawn, direct this here as seems to be only place to catch you.

I have 2 buttons where the other one is default and the other one has tabstop=1

after user pressing with mouse on that keyboard-disabled button, there is no way I can direct the tab focus from the button.

I've tried all the things I can imagine.
as I 4 months already stated, tryied then with setfocus, that sets the focus to elsewhere but the black border around the tabstopped button remains.

then next one was to disable the button setfocus elsewhere and enable. no can do.
same effect with hide/show.

next one was to change the event to onmouseup which neither helped.

then saw something weird while testing with almost all these combined and setfocus shooted almost everywhere:
the border goes away on every second click.
so, on first one appears and on disappears [Eek!]

is there any solution foundable or am I trying to accomplish something unpossible?


JochenAdministrator
(KiX Supporter)
2002-12-01 09:07 PM
Re: tabstop/setfocus/enabled - kixforms button weirdness

As always Joeel , add a snippet of code !

I had this problem too (for example one can't make a button default and Enable cancel(ESC) on it the same time !)


JochenAdministrator
(KiX Supporter)
2002-12-02 09:16 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Jooel,

how about a short sample ? No ?
Hello ???


LonkeroAdministrator
(KiX Master Guru)
2002-12-02 09:20 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

I hate these samples as they need always some code.
and to make the sample for everything used, well the board has no power to handle such a post [Wink]

wait a sec.


JochenAdministrator
(KiX Supporter)
2002-12-02 09:25 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

ah well , you can condense what you want to show in a snippet ... as always one can't post the whole 2600 line thing [Eek!]

LonkeroAdministrator
(KiX Master Guru)
2002-12-02 09:33 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

what I want is no can do with code.
what I do when trying to get it, I can show.

but as I said, I can't post all the trials just an example.


JochenAdministrator
(KiX Supporter)
2002-12-02 09:35 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Yeah ... go ahead .. .may be that I can help ya (Yes, I have experience with this stuff [Wink] )

LonkeroAdministrator
(KiX Master Guru)
2002-12-02 09:41 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

ok, I still think the forms layout calculator is little wrong as normally need 5 adjusting pixels in the width.
anyway, here is something:
code:
$=createobject("kixtart.form")
$.size=80,120
$.center
$notab=$.button("please, no tab",5,10,70,20)
$notab.tabstop=0
$notab.onmouseup="$$second.setfocus"
$second=$.button("second",5,40,70,20)
$exit=$.button("exit",5,70,70,20)
$exit.onclick="$$.hide"
$exit.defaul=1
$.show
while $.visible $nul=execute($.doevents) loop

there is no way you can remove the black border around the notab button once you have clicked it.

and btw, rod/shawn, documentation on the tabstop in:
http://www.kixforms.freeuk.com/Docs/Properties/tabstop.htm

is wrong.


LonkeroAdministrator
(KiX Master Guru)
2002-12-02 09:58 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

got it, the old style.
was going to shower (that is place for all inventions)

so:
code:
$=createobject("kixtart.form")
$.size=80,120
$.center
$notab=$.button("please, no tab",5,10,70,20)
$notab.tabstop=0
$notab.onmouseup="$$nul=sendkeys('{tab}')"
$second=$.button("second",5,40,70,20)
$exit=$.button("exit",5,70,70,20)
$exit.onclick="$$.hide"
$exit.defaul=1
$.show
while $.visible $nul=execute($.doevents) loop



JochenAdministrator
(KiX Supporter)
2002-12-02 10:02 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

The black border around notab is removed by a TAB

... what would you like it to be ?


JochenAdministrator
(KiX Supporter)
2002-12-02 10:05 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Hehe , best place for inventions is the bathroom / smoking a cigarette or something similar !

So you did a sendkeys {TAB} by kix ... how about a $button.Setfocus ???

[ 02. December 2002, 10:10: Message edited by: jpols ]


JochenAdministrator
(KiX Supporter)
2002-12-02 10:08 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

is that what you wanted it to be =?

code:
break on

$=createobject("kixtart.form")
$.size=80,120
$.center
$notab=$.button("please, no tab",5,10,70,20)
$notab.tabstop=0
$notab.onmouseOver="$$second.SetFocus"
$second=$.button("second",5,40,70,20)
$exit=$.button("exit",5,70,70,20)
$exit.onclick="$$.hide"
$exit.defaul=1
$.show
while $.visible $nul=execute($.doevents) loop



quit ()



JochenAdministrator
(KiX Supporter)
2002-12-02 10:12 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

weirdo :

[Eek!]

code:
break on

$=createobject("kixtart.form")
$.size=80,120
$.center
$notab=$.button("please, no tab",5,10,70,20)
$notab.tabstop=0
$notab.OnClick="$$second.SetFocus $$second.Default = 1"
$second=$.button("second",5,40,70,20)
$exit=$.button("exit",5,70,70,20)
$exit.onclick="$$.hide"
$exit.defaul=1
$.show
while $.visible $nul=execute($.doevents) loop



quit ()



JochenAdministrator
(KiX Supporter)
2002-12-02 10:18 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Ok,

Senkeys ({tab}) seems to be the only way (by now)


LonkeroAdministrator
(KiX Master Guru)
2002-12-02 10:22 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

j, look at my first code and you could have skipped your last 4 replies [Razz]

LonkeroAdministrator
(KiX Master Guru)
2002-12-02 10:24 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Like said, I have tried all the means.
even hiding and disabling.

there is no way without external help.
that is the reason for this topic, but as I've seen, shawn is too busy to even look at the board.


JochenAdministrator
(KiX Supporter)
2002-12-02 10:25 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Yessir , that was the famous , tried all possibilities while you solved it for yerself ...

Sorry, no shower in here [Big Grin]


LonkeroAdministrator
(KiX Master Guru)
2002-12-02 10:30 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

also, shawn, if one has messagebox without system modal, it does not appear in the taskbar, this means that only way to find it would be to minimize windows one by one, weird?

anyway, having a system modal dialog on the top is no goodie as it removes the possibility to hide it while doing current urgent job.

this actually would have been good reason for other topic but anyway.


JochenAdministrator
(KiX Supporter)
2002-12-02 10:33 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

one should always work with the kixforms.msgbox() while running KiXforms !

LonkeroAdministrator
(KiX Master Guru)
2002-12-02 10:37 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

j, back again with some not reading!

that is the problem, I'm currently using kixforms messagebox and it does not work as expected.
the old kixtarts messagebox (in checker 1.5.x) had no problems whatsoever.


JochenAdministrator
(KiX Supporter)
2002-12-02 10:48 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

think this can be handled as expected ... or not ?

JochenAdministrator
(KiX Supporter)
2002-12-02 10:50 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

for reasons of being forms conform you can always make a costum subform !

(I had this exercised with a splash screen , one can mark to never show again)


LonkeroAdministrator
(KiX Master Guru)
2002-12-02 10:51 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

this can be handled as not expected.
expected behaviour would be similarity.

anyway, if this is expected, my message would be request to change it.

and meanwhile I turn back to using kixtarts function.


JochenAdministrator
(KiX Supporter)
2002-12-02 11:03 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

and the msgbox holds your script execution untill it'S answered , no ?

LonkeroAdministrator
(KiX Master Guru)
2002-12-02 11:15 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

as it's in own process, no

LonkeroAdministrator
(KiX Master Guru)
2002-12-05 02:45 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

shawn, you got anything to say? [Frown]

ShawnAdministrator
(KiX Supporter)
2002-12-05 03:04 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Can you give me the Readers Digest version of what the problem is ... i've downloaded a couple of these sample scripts, but can you bring me up-to-speed ?

LonkeroAdministrator
(KiX Master Guru)
2002-12-05 03:10 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

simply, install new checker and see how it should go [Wink]

the current status is that I handled the removing of "active" element borders around button by sending a tab-character to form with sendkeys.

with kixforms functions, I could remove the focus but the black border remained.

so, seems that the setfocus does not "activate" the control and this causes that there is still left the borders around the old focused control.

kind of mark of users last action.


ShawnAdministrator
(KiX Supporter)
2002-12-05 03:26 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Removed the focus with TabStop = False ?

NTDOCAdministrator
(KiX Master)
2002-12-05 03:27 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

[Cool]

LonkeroAdministrator
(KiX Master Guru)
2002-12-05 03:28 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

the tabstop does not with it if user clicks the control with his mouse.

NTDOCAdministrator
(KiX Master)
2002-12-05 03:31 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Lonkero,

Sorry but I'm not sure what you're trying to explain. Can you try explaining another way?


ShawnAdministrator
(KiX Supporter)
2002-12-05 03:32 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Heres the definition of TabStop :


Gets or sets a boolean indicating whether the user can give the focus to this control using the TAB key. The default is True.


TabStop just disables the user from navigating to the button via the TAB key ... the mouse is not effected by this property.


LonkeroAdministrator
(KiX Master Guru)
2002-12-05 03:33 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

[Mad]
well, at least jochen understood me.
should I hire an interpreter? [Big Grin]


LonkeroAdministrator
(KiX Master Guru)
2002-12-05 03:36 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

shawn, yes yes.
but the issue is, that still after I use $anotherControl.setfocus the control stays "active"
active by means of the black border around it.

you can see it with those test scripts.

btw, someone else should also try them and maybe even understand. [Razz]


NTDOCAdministrator
(KiX Master)
2002-12-05 03:36 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Only if he speaks ebonics or spanish...

LOL

No, just sometimes difficult to get your idea across in writing let alone tranlating the meaning into another language.


ShawnAdministrator
(KiX Supporter)
2002-12-05 03:39 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Yeah, i think i see behavior now. You click a button and the highlite border turns on - then if you SetFocus in code to another control, the highlite border stays on the old control, yeah ?

Les
(KiX Master)
2002-12-05 03:41 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

YES!



[ 05. December 2002, 03:42: Message edited by: LLigetfa ]


LonkeroAdministrator
(KiX Master Guru)
2002-12-05 03:41 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

shawn, I wonder what in my words was so different that it takes for everyone hour or 2 to understand? [Frown]
should I move to canada and learn how you ppl think so could write better [Wink]

anyway, you got it.


ShawnAdministrator
(KiX Supporter)
2002-12-05 03:46 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Let me test this with vb6 ... right back ...

ShawnAdministrator
(KiX Supporter)
2002-12-05 03:51 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

yeah - the highlite should move to the focused item - other than that - the behavior under these scenarios looks pretty consistent with VB ...

LonkeroAdministrator
(KiX Master Guru)
2002-12-05 03:54 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

so, fixable, no?

ShawnAdministrator
(KiX Supporter)
2002-12-05 03:56 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Actually I should qualifiy that statement - you "made it" consistent yourself by coding the SetFocus to another control. In VB, if TabStop = False, when a button is clicked the focus automatically moves to the next control in the ZOrder. So guess there are two issues here.

JochenAdministrator
(KiX Supporter)
2002-12-05 09:14 AM
Re: tabstop/setfocus/enabled - kixforms button weirdness

Did you say ZOrder ?

Master of the Universe ?

Wasn't this just for ordering and seperating overlapping Images ???

[Big Grin]