Binding BackColor property

  • Thread starter Thread starter Igor Zhavrid
  • Start date Start date
I

Igor Zhavrid

I tried to bind BackColor property of TabPage

Protected Sub BindTP()

For i As Integer = 0 To tcMain.TabPages.Count - 1

tcMain.TabPages(i).DataBindings.Add(New Binding("BackColor", appSettings,
"MainFormColor"))

Next

end sub

The appSettings is some class, and its property MainFormColor is Color.
It's work fine, but when I do something like

appSettings.MainFormColor = Color.White

nothing is happens on PocketPC. Under Win2000 color of the tab pages changes
after selecting of some tab page.
How can I force refreshing of the binded property?
 
For DataBinding to work properly, not only does the MainFormColor property
need to be written, but also a MainFormColorChanged event needs to exist on
the appSettings class. If that doesn't solve the problem, I can help you if
you can post a small complete working example of your problem.

David Wrighton

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Igor Zhavrid" <[email protected]>
| Subject: Binding BackColor property
| Date: Fri, 10 Oct 2003 11:49:15 +0300
| Organization: BelCAF News Server
| Lines: 26
| Message-ID: <[email protected]>
| Mime-Version: 1.0
| Content-Type: text/plain;
| charset="koi8-r"
| Content-Transfer-Encoding: 7bit
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: zubr.sam-solutions.net 217.21.35.61
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl!zubr.belcaf.m
insk.by!not-for-mail
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:35658
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| I tried to bind BackColor property of TabPage
|
| Protected Sub BindTP()
|
| For i As Integer = 0 To tcMain.TabPages.Count - 1
|
| tcMain.TabPages(i).DataBindings.Add(New Binding("BackColor", appSettings,
| "MainFormColor"))
|
| Next
|
| end sub
|
| The appSettings is some class, and its property MainFormColor is Color.
| It's work fine, but when I do something like
|
| appSettings.MainFormColor = Color.White
|
| nothing is happens on PocketPC. Under Win2000 color of the tab pages
changes
| after selecting of some tab page.
| How can I force refreshing of the binded property?
|
| --
| Best regards,
| Igor Zhavrid
|
|
 
Back
Top