Board index » cppbuilder » TabControl popup menu...

TabControl popup menu...


2006-06-10 07:46:52 PM
cppbuilder13
I have a tabcontrol that I use so users can tab through a set list of
text files. I have a popup menu that lets users close any of the tabs
but the problem is that they have to first left-click the tab and then
right-click to bring up the popup menu to close the tab. If they just
right click on a tab it will not select that tab? How would I do that?
To sum up, I would like for a right click to be allowed to select the
tab before the popup appears, just like when tabbing through files in
the C++ Builder IDE? ANy thoughts?
Rory.
 
 

Re:TabControl popup menu...

"Rory Walsh" < XXXX@XXXXX.COM >wrote in message news:448ab136$ XXXX@XXXXX.COM ...
Quote
I have a tabcontrol
If they just right click on a tab it will not select that tab?
How would I do that?
void __fastcall TForm2::TabControl1MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if( Button == mbRight )
{
int Index = TabControl1->IndexOfTabAt( X, Y );
if( Index != -1 )
TabControl1->TabIndex = Index;
}
}
Todd
 

Re:TabControl popup menu...

EnergyKey
------------------------------ ------------------------------
------------------------------
www30.webSamba.com/SmartStudio
------------------------------ ------------------------------
------------------------------
Save yourself from repetitive tasks
 

{smallsort}