Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TabCtrl » how to move the focus from one tab page to another one
how to move the focus from one tab page to another one [message #2985] Tue, 02 May 2006 19:15 Go to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

I've 4 beautyfull tab pages (tab1,..., tab4). In corrispondence of an action performed in tab1, I desire that tab2 be displayed... and maybe the focus should be on button btnAuto of tab2... but this last task is not necessary.
How to do it? To show tab2 I tried:
ActiveFocus(tab2);  
...
ActiveFocus(tab2.btnAuto); 
...
tab2.btnAuto.SetFocus(); 
...
tab2.btnAuto.GetFocusCtrl(); 

none of them work. Any idea?

Luigi

PS: if nobody will answer to my old post regarding how to get the current directory of the application, I'll use a dirty... very dirty way to get it. Smile
Re: how to move the focus from one tab page to another one [message #2986 is a reply to message #2985] Tue, 02 May 2006 20:17 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
forlano wrote on Tue, 02 May 2006 13:15

Hello,

I've 4 beautyfull tab pages (tab1,..., tab4). In corrispondence of an action performed in tab1, I desire that tab2 be displayed... and maybe the focus should be on button btnAuto of tab2... but this last task is not necessary.
How to do it? To show tab2 I tried:
ActiveFocus(tab2);  
...
ActiveFocus(tab2.btnAuto); 
...
tab2.btnAuto.SetFocus(); 
...
tab2.btnAuto.GetFocusCtrl(); 

none of them work. Any idea?



void TabCtrl::Set(int _top, bool focus = false);

_top - index of tab
focus - move focus to the first child

Quote:


PS: if nobody will answer to my old post regarding how to get the current directory of the application, I'll use a dirty... very dirty way to get it. Smile


Sorry, missed that one. .exe folder related (at the moment, non-portable, just Win32):

String GetExeDirFile(const char *fp);

- file from the .exe folder

String GetExeFilePath();

- full path to .exe

Means, .exe folder is GetFileFolder(GetExeFilePath());

Current working directory:

String GetCurrentDirectory();

Mirek
Re: how to move the focus from one tab page to another one [message #2994 is a reply to message #2986] Wed, 03 May 2006 00:58 Go to previous message
fudadmin is currently offline  fudadmin
Messages: 1321
Registered: November 2005
Location: Kaunas, Lithuania
Ultimate Contributor
Administrator
Sorry, Smile I've split this topic and moved one part of it to FileSel, Path forum. You can read it there.
Next Topic: Problems with the visualization of tabctrl in 608-dev1
Goto Forum:
  


Current Time: Fri Mar 29 13:18:32 CET 2024

Total time taken to generate the page: 0.01413 seconds