From: Leo on
I have an app that refuses to cooperate when I turn wordwrap on then
off while the status bar is visible. If I perform those actions, the
status bar does not get drawn correctly. What is the best way of
solving this. There must be a way as notepad seems to gracefuly handle
it (I am currently just forbiding this opperation by displaying a
msgbox and exiting the operation). Thankyou.

--
ClassicVB Users Regroup! comp.lang.basic.visual.misc
Free usenet access at http://www.eternal-september.org


From: Larry Serflaten on

"Leo" <ttdhead(a)gmail.com> wrote
> I have an app that refuses to cooperate when I turn wordwrap on then
> off while the status bar is visible. If I perform those actions, the
> status bar does not get drawn correctly. What is the best way of
> solving this. There must be a way as notepad seems to gracefuly handle
> it (I am currently just forbiding this opperation by displaying a
> msgbox and exiting the operation). Thankyou.


Concise code to demostrate the problem would help in offering a solution.....

LFS


From: C. Kevin Provance on

"Leo" <ttdhead(a)gmail.com> wrote in message
news:huvgor$2ut$1(a)news.eternal-september.org...
:I have an app that refuses to cooperate when I turn wordwrap on then
: off while the status bar is visible. If I perform those actions, the
: status bar does not get drawn correctly. What is the best way of
: solving this. There must be a way as notepad seems to gracefuly handle
: it (I am currently just forbiding this opperation by displaying a
: msgbox and exiting the operation). Thankyou.

Are we talking about the standard common control status bar, or one you've
designed yourself, or are you subclassing the MSFT version to change
colours?

Specifics, please.

From: Leo on
It happens that C. Kevin Provance formulated :
> "Leo" <ttdhead(a)gmail.com> wrote in message
> news:huvgor$2ut$1(a)news.eternal-september.org...
>> I have an app that refuses to cooperate when I turn wordwrap on then
>> off while the status bar is visible. If I perform those actions, the
>> status bar does not get drawn correctly. What is the best way of
>> solving this. There must be a way as notepad seems to gracefuly handle
>> it (I am currently just forbiding this opperation by displaying a
>> msgbox and exiting the operation). Thankyou.
>
> Are we talking about the standard common control status bar, or one you've
> designed yourself, or are you subclassing the MSFT version to change
> colours?
>
> Specifics, please.

The standard common control one in the v5 ocx

--
ClassicVB Users Regroup! comp.lang.basic.visual.misc
Free usenet access at http://www.eternal-september.org


From: Leo on
Larry Serflaten wrote on 13/06/2010 :
> "Leo" <ttdhead(a)gmail.com> wrote
>> I have an app that refuses to cooperate when I turn wordwrap on then
>> off while the status bar is visible. If I perform those actions, the
>> status bar does not get drawn correctly. What is the best way of
>> solving this. There must be a way as notepad seems to gracefuly handle
>> it (I am currently just forbiding this opperation by displaying a
>> msgbox and exiting the operation). Thankyou.
>
>
> Concise code to demostrate the problem would help in offering a solution.....
>
> LFS
The problem only occurs if I comment the if out.

If mnuFormatWordWrap.Checked Then
mnuFormatWordWrap.Checked = False
WWToggle False
Else
If mnuViewStatusBar.Checked = True Then
MsgBox "Please hide the status bar first"
Exit Sub
End If
mnuFormatWordWrap.Checked = True
WWToggle True
End If

Sub WWToggle(WWrap As Boolean)
Dim txt As String
txt = txtDocument.text & txtDocumentWW.text
If WWrap Then
txtDocumentWW.ZOrder 0
txtDocument.text = ""
txtDocumentWW.text = txt
Else
txtDocument.ZOrder 0
txtDocumentWW.text = ""
txtDocument.text = txt
End If
End Sub

If the statusbar is visible when I set ww on it draws the textbox over
the statusbar and if I make the status bar hidden then visible again,
it doesn't get drawn properly unless I resize the form. For good
measure here is the code to show the statusbar

Private Sub mnuViewStatusBar_Click()
If mnuViewStatusBar.Checked Then
mnuViewStatusBar.Checked = False
sbrMain.Visible = False
Me.ActiveControl.Height = Me.ScaleHeight
Else
If mnuFormatWordWrap.Checked = True Then
MsgBox "Please turn Word Wrap off first"
Exit Sub
End If
mnuViewStatusBar.Checked = True
sbrMain.Visible = True
Me.ActiveControl.Height = Me.ScaleHeight - sbrMain.Height
End If

--
ClassicVB Users Regroup! comp.lang.basic.visual.misc
Free usenet access at http://www.eternal-september.org