Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / October 2003

Tip: Looking for answers? Try searching our database.

How to get scroll bars to update when using ITextDocument and ITextRange???

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eli Pulsifer - 26 Sep 2003 00:58 GMT
I have a range object which I use to append text to the end of a rich edit
control.

The problem is that the scroll bars do not appear once the text overflows
the window.

If the window is manually resized, the scroll bars show up and everything
works form that point on.

Any have any suggestions as to how I can resolve this problem?

Eli
Luis Ugaz - 02 Oct 2003 20:53 GMT
All classes can have application settings in their own
config file.
This article explains how:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?
txtCodeId=277&lngWId=10

In DotNet we now have Configuration Files.
This are XML files that can be changed as needed
without recompiling the application.

There are four different kind of configuration files:
- Machine Configuration Files
- Application Configuration Files
- Security Configuration Files
- ASP.NET Configuration Files

The Application Configuration File is to compare
with an INI file. With one big difference that
you only can Read settings, but not Write settings!
Writing has to be done manualy.

To use a configuration file you must add an
'Application Configuration File' to your project.

In the Visual Studio Environment this can be done by
right clicking the project, choose 'add new item'.
Then look for the item 'Application Configuration File'.
This will add an 'App.Config' file to your project.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
</configuration>

To add your own settings, you must add a section
called 'appSettings'.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
</appSettings>
</configuration>

Here you can store your settings as key/value pairs.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="Test1" value="This is the value of Test1" />
<add key="Test2" value="This is the value of Test2" />
</appSettings>
</configuration>

!!! BEWARE.......THE TEXT IS CASE SENSITIVE !!!

'appSettings' is not the same as 'appsettings'
Notice the captial S.
A runtime error will occure if you make a typing error.

An VB.NET example to read from the Configuration file.

Imports System
Imports System.Console

Module Module1

Sub Main()
Try
Dim config As Configuration.ConfigurationSettings

' Read the key:Test2
WriteLine(config.AppSettings("Test2"))

' To read all key's
Dim key As String

For Each key In config.AppSettings.AllKeys
WriteLine(key & " -- " & config.AppSettings(key))
Next

WriteLine("")

Catch ex As Exception
WriteLine("")
WriteLine(ex.ToString)

Finally
Read()

End Try
End Sub

End Module

>-----Original Message-----
>I have a range object which I use to append text to the end of a rich edit
[quoted text clipped - 11 lines]
>
>.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.