List Info

Thread: The moving RichTextControl




The moving RichTextControl
country flaguser name
United States
2007-08-19 16:34:51

 

Hi,


I am using DialogBlocks version 4,11; wxWidgets-2,8,4 in a Windoze XP environment. I have a wxDialog form with some rather extensive editing functions. At the bottom of the form I have a wxRichTextControl which, if necessary, I fill with error messages. If there are no errors, the box remains empty and processing continues. If there are errors they are all shown in the wxRichTextControl, and all errors must be corrected before processing can continue.


My preference is to bring up the form with the RichTextControl hidden. Only if there are errors should the box become visible. I would think it a very easy task. I set the hidden flag on and when the form is brought up, the control is not visible. When errors are detected I simply do a

Error_List->Show(True) which should make the control visible which it does do; however, it is positioned at the top left hand corner of the form. I don't want it there. I want it where I put it at design time; at the bottom of the form in the middle. What do I have to do to accomplish this seemingly easy task.


Thanks for all suggestions, ideas, criticisms, and witticisms.



Robert Berman



 

Hi,


I am using DialogBlocks version 4,11; wxWidgets-2,8,4 in a Windoze XP environment. I have a wxDialog form with some rather extensive editing functions. At the bottom of the form I have a wxRichTextControl which, if necessary, I fill with error messages. If there are no errors, the box remains empty and processing continues. If there are errors they are all shown in the wxRichTextControl, and all errors must be corrected before processing can continue.


My preference is to bring up the form with the RichTextControl hidden. Only if there are errors should the box become visible. I would think it a very easy task. I set the hidden flag on and when the form is brought up, the control is not visible. When errors are detected I simply do a

Error_List->Show(True) which should make the control visible which it does do; however, it is positioned at the top left hand corner of the form. I don't want it there. I want it where I put it at design time; at the bottom of the form in the middle. What do I have to do to accomplish this seemingly easy task.


Thanks for all suggestions, ideas, criticisms, and witticisms.



Robert Berman





Boardwalk for $500? In 2007? Ha!
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.

__._,_.___
.

__,_._,___
Re: The moving RichTextControl
country flaguser name
United States
2007-08-19 19:23:54

--- In anthemion-devtools%40yahoogroups.com">anthemion-devtoolsyahoogroups.com, Robert Berman
<ruvenlieb...> wrote:
>
> Hi,
>
>
> I am using DialogBlocks version 4,11; wxWidgets-2,8,4 in a Windoze
XP environment. I have a wxDialog form with some rather extensive
editing functions. At the bottom of the form I have a
wxRichTextControl which, if necessary, I fill with error messages. If
there are no errors, the box remains empty and processing continues.
If there are errors they are all shown in the wxRichTextControl, and
all errors must be corrected before processing can continue.
>
>
> My preference is to bring up the form with the RichTextControl
hidden. Only if there are errors should the box become visible. I
would think it a very easy task. I set the hidden flag on and when the
form is brought up, the control is not visible. When errors are
detected I simply do a
> Error_List->Show(True) which should make the control visible which
it does do; however, it is positioned at the top left hand corner of
the form. I don't want it there. I want it where I put it at design
time; at the bottom of the form in the middle. What do I have to do to
accomplish this seemingly easy task.
>
>
> Thanks for all suggestions, ideas, criticisms, and witticisms.
>
>
>
>
> Robert Berman
>
>
>
>
> Hi,
>
>
> I am using DialogBlocks version 4,11; wxWidgets-2,8,4 in a Windoze
XP environment. I have a wxDialog form with some rather extensive
editing functions. At the bottom of the form I have a
wxRichTextControl which, if necessary, I fill with error messages. If
there are no errors, the box remains empty and processing continues.
If there are errors they are all shown in the wxRichTextControl, and
all errors must be corrected before processing can continue.
>
>
> My preference is to bring up the form with the RichTextControl
hidden. Only if there are errors should the box become visible. I
would think it a very easy task. I set the hidden flag on and when the
form is brought up, the control is not visible. When errors are
detected I simply do a
> Error_List->Show(True) which should make the control visible which
it does do; however, it is positioned at the top left hand corner of
the form. I don't want it there. I want it where I put it at design
time; at the bottom of the form in the middle. What do I have to do to
accomplish this seemingly easy task.
>
>
> Thanks for all suggestions, ideas, criticisms, and witticisms.
>
>
>
>
> Robert Berman
>

Hi!

Your description is rather sketchy. If you have a .pjd to share (with
sources that have hand coding in them because they cannot be
regenerated), it would help. It takes much less time to ferret out the
problem and fewer exchanges back and forth in posts!;)

My first question would be are you using sizers? If so, and the
RichText is contained in a sizer, you need to call Layout() for the
sizer after the Show().

E.G.:

MyFrame::ShowErrors()
{
ErrorText->Show();
MyFrameSizer->Layout();
}

You don't have to actually name the sizer (I do as a matter of course
for all my elements for readability and for easy access). You can just
call MyFrame->GetSizer()->Layout(). I just find this unnecessary
indirection so I give the sizer a Member variable name. It is, of
course, your choice.

BTW, why a wxRichTextCtrl for a simple error window? RichText is more
for formal editing/word processing display with images, icons, varied
fonts, and varied placements. A wxTextCtrl would do quite nicely with
less overhead, jmtcw!;)

HTH:

thx,
Dave S.

wxMS_developers · Development with wxWidgets on MSWindows
http://tech.groups.yahoo.com/group/wxMS_developers/

wxWidgets Code Exchange
http://www.wxCodex.net/

__._,_.___
.

__,_._,___
Re: The moving RichTextControl
country flaguser name
United States
2007-08-19 19:24:44


On Aug 19, 2007, at 2:34 PM, Robert Berman wrote:

> Hi,
>
>
> I am using DialogBlocks version 4,11; wxWidgets-2,8,4 in a Windoze
> XP environment. I have a wxDialog form with some rather extensive
> editing functions. At the bottom of the form I have a
> wxRichTextControl which, if necessary, I fill with error messages.
> If there are no errors, the box remains empty and processing
> continues. If there are errors they are all shown in the
> wxRichTextControl, and all errors must be corrected before
> processing can continue.
>
>
> My preference is to bring up the form with the RichTextControl
> hidden. Only if there are errors should the box become visible. I
> would think it a very easy task. I set the hidden flag on and when
> the form is brought up, the control is not visible. When errors are
> detected I simply do a
> Error_List->Show(True) which should make the control visible which
> it does do; however, it is positioned at the top left hand corner
> of the form. I don't want it there. I want it where I put it at
> design time; at the bottom of the form in the middle. What do I
> have to do to accomplish this seemingly easy task.
>
>
> Thanks for all suggestions, ideas, criticisms, and witticisms.
>
>
>
>
> Robert Berman
>
>
>
>
> Hi,
>
>
> I am using DialogBlocks version 4,11; wxWidgets-2,8,4 in a Windoze
> XP environment. I have a wxDialog form with some rather extensive
> editing functions. At the bottom of the form I have a
> wxRichTextControl which, if necessary, I fill with error messages.
> If there are no errors, the box remains empty and processing
> continues. If there are errors they are all shown in the
> wxRichTextControl, and all errors must be corrected before
> processing can continue.
>
>
> My preference is to bring up the form with the RichTextControl
> hidden. Only if there are errors should the box become visible. I
> would think it a very easy task. I set the hidden flag on and when
> the form is brought up, the control is not visible. When errors are
> detected I simply do a
> Error_List->Show(True) which should make the control visible which
> it does do; however, it is positioned at the top left hand corner
> of the form. I don't want it there. I want it where I put it at
> design time; at the bottom of the form in the middle. What do I
> have to do to accomplish this seemingly easy task.
>
>
> Thanks for all suggestions, ideas, criticisms, and witticisms.
>
>
>
>
> Robert Berman

You need to call Layout() on the wxDialogBox after calling Show() or
Hide(). This tells the sizer to put the wxRichTextCtrl where it
belongs, or to re-shrink the dialog box when concealing it.

Regards,
John Ralls

__._,_.___
.

__,_._,___
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )