How to simulate mouse down on a control

  • Thread starter Thread starter Will Chapman
  • Start date Start date
W

Will Chapman

I have a tabcontrol with 3 tabpages. On page one
there is a button which starts a background process
that initiates activity that, when complete, fires an
event.

When the event fires I want to invoke a mouse tap
on another one of the tabpages so that it displays.

I have managed this (in C#) with:

tabPage3.BringToFront();

however, while this displays the content of tabPage3
the tab itself doesn't have focus (it stays with the original
tab). I've tried tabPage3.Focus() but that has no effect.

Any suggestions?
 
Will,

Good to see you here Will. I see you've got the answer. Did the Palm break
or something<g>

Graham
 
Graham said:
Will,

Good to see you here Will. I see you've got the answer. Did the Palm
break or something<g>
Hi Grum

Nope the Palm (Treo) versions of my software are working fine but
there's no doubt that the best way to write stuff for PPC is via .NET.

Being 'retired' I only have one live project and that involves using
GPS and GRPS (i.e. TCP/IP) on both PalmOS and PPC. What
is your current area of interest?

Cheers...

Will


--
Cheers.......


Will Chapman
nb Quidditch
 
Sergey said:
Try to change tabControl.SelectedIndex property.

Sergey, that did the trick, many thanks (easy when
you know how!)

Cheers...

Will Chapman
--
Cheers.......


Will Chapman
nb Quidditch
 
Will,

Went email.

Will Chapman said:
Hi Grum

Nope the Palm (Treo) versions of my software are working fine but
there's no doubt that the best way to write stuff for PPC is via .NET.

Being 'retired' I only have one live project and that involves using
GPS and GRPS (i.e. TCP/IP) on both PalmOS and PPC. What
is your current area of interest?

Cheers...

Will



--
Cheers.......


Will Chapman
nb Quidditch
 
I had the same problem. I had to use a mouse down and up for a button.
Here is my solution.
I placed a black picturebox and over it a panel (this one supports mouse
down event) with a label. The label stands for the name of the "button".
The panel was 2 pixels smaller in height and width than the picturebox
in order to create the appearence of the border.
Further implement mouse_down and up events for the panel. Don't forget
to change also la colors of the controls properly (SytemColor.Control
<-> Color.Black).
Hope this works
 
Back
Top