Le 29 sept. 06 à 13:47 Soir, Bart Pietercil a écrit:
Thx Arnaud,
You are welcome.
since it is only 2 weeks I'm using RB haven't look into declares.
But do I understand it correctly that the solution you are giving
me only works on Mac and not on Win or Linux ?
The solution I need has to work on all platforms
Yes, you're completely right. This is simply because disabling a
single tab panel is not supported at all under Win32 (I don't know
about linux). I mean, the Win32 OS does not provide a way to do so
(assuming you don't create your own tab panel from scratch, obviously).
Do i need to do #pragma and have other libs for the other
platforms? Any ideas what they are called ?
ditto.
And more general. Is this functionality not often required? Should
I need to make a feature request ?
A feature request will not be useful since it's not the fault of RB.
You may ask the creators of Windows, but... (somehow a joke).
You can, for example, do this:
Add a property (e.g in the window, to make things simples)
MyLastIndex as integer
In the PagePanel, put this in the Change event:
if me.Value=2 then
Beep
MsgBox "You can't use that tab."
me.Value=MyLastIndex
Else
MyLastIndex=me.Value
end if
Indeed, it would be more elegant to disable the tab, but it's not
possible.
Another way, if you are using RB 2005 or 2006, would be to remove
completely the tab. As I don't use RB 2005, I can't predict if
embedded controls are also removed/hidden or if they are going to
another tab, etc.
Hope this helps.
On 29-sep-06, at 13:39, Arnaud Nicolet wrote:
Le 29 sept. 06 à 11:10 Matin, Bart Pietercil a écrit:
Hi List,
I didn't find a way to enable or disable one (or more but not
all) pages of a tabpanel. How would I go about disabling a second
page of a tabpanel while not disabling the first page?
Not possible or .....?
Use this declare:
Sub EnableOrDisableTab(ThePanel As TabPanel,TabIndex As
Integer,enabled As Boolean)
dim err as integer
declare function SetTabEnabled lib "AppearanceLib" (tabcontrol as
Integer, tabindex as short, enabled as boolean) as Short
err = SetTabEnabled(ThePanel.MacControlHandle, TabIndex, enabled)
'if err<>0 then an error occurred
End sub
For MacOS X, replace "AppearanceLib" with
"CarbonLib"_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>