1. RE: RichEdit title bar text
- Posted by Brian Broker <bkb at cnw.com> Jun 10, 2002
- 574 views
A control is not a window. A window contains the control. Use setText() on the window containing the richedit control. -- Brian tone.skoda wrote: > i got a simple question: > how do you set window title to RichEdit control? > not the data but title bar, window has style WS_CAPTION > > setText() changes data not title
2. RE: RichEdit title bar text
- Posted by Brian Broker <bkb at cnw.com> Jun 10, 2002
- 542 views
I guess I have to retract my reply since the PSDK states that "A rich edit control is a window in which the user can enter, edit, format, print, and save text." I didn't know that you could have a richedit control with a title... I'll have to figure out the the correct message to send to the control. -- Brian Brian Broker wrote: > A control is not a window. A window contains the control. Use > setText() on the window containing the richedit control. > > -- Brian > > > tone.skoda wrote: > > i got a simple question: > > how do you set window title to RichEdit control? > > not the data but title bar, window has style WS_CAPTION > > > > setText() changes data not title > > >
3. RE: RichEdit title bar text
- Posted by Matthew Lewis <matthewwalkerlewis at YAHOO.COM> Jun 10, 2002
- 585 views
Technically, all controls are windows. Some just have more interesting event handlers. :) Tone, are you saying that you've created a RichEdit with WS_CAPTION? You might try manually sending WM_SETTEXT. setText() will use SetWindowText() for a RichEdit, which goes to the edit part of the RichEdit, rather than the window caption. The docs for SetWindowText() say that it will correctly change the caption on a listbox with WS_CAPTION set, but I've never tried to put a caption on a RichEdit control directly. Matt Lewis > -----Original Message----- > From: Brian Broker [mailto:bkb at cnw.com] > I guess I have to retract my reply since the PSDK states that "A rich > edit control is a window in which the user can enter, edit, format, > print, and save text." I didn't know that you could have a richedit > control with a title... > > I'll have to figure out the the correct message to send to > the control. > > -- Brian > > Brian Broker wrote: > > A control is not a window. A window contains the control. Use > > setText() on the window containing the richedit control. > > > > -- Brian > > > > > > tone.skoda wrote: > > > i got a simple question: > > > how do you set window title to RichEdit control? > > > not the data but title bar, window has style WS_CAPTION > > > > > > setText() changes data not title
4. RE: RichEdit title bar text
- Posted by Brian Broker <bkb at cnw.com> Jun 10, 2002
- 561 views
Got me... both 'SetWindowText' and message WM_SETTEXT appear to set *both* the title and the data (on WinXP). Not sure how you'd get around this one. The only thing I can think of is that RichEdit controls aren't meant to have captions(?) -- Brian Brian Broker wrote: > I guess I have to retract my reply since the PSDK states that "A rich > edit control is a window in which the user can enter, edit, format, > print, and save text." I didn't know that you could have a richedit > control with a title... > > I'll have to figure out the the correct message to send to the control. > > -- Brian > > Brian Broker wrote: > > A control is not a window. A window contains the control. Use > > setText() on the window containing the richedit control. > > > > -- Brian > > > > > > tone.skoda wrote: > > > i got a simple question: > > > how do you set window title to RichEdit control? > > > not the data but title bar, window has style WS_CAPTION > > > > > > setText() changes data not title > > > > > >
5. RE: RichEdit title bar text
- Posted by Brian Broker <bkb at cnw.com> Jun 10, 2002
- 622 views
I guess this is how I would get around it. Create a child window containing the richedit control. This way you can set the title of the child window using setText(). You can also resize the window... ---------------------- include Win32Lib.ew without warning constant Win = create( Window, "Main", 0, Default, Default, 400, 400, 0 ), ChildWin = create( Window, "Sub Window", Win, 0, 0, 0, 0, {WS_SIZEBOX,WS_CAPTION,WS_CHILD} ), Redt = create( RichEdit, "", ChildWin, 0, 0, 0, 0, 0 ) procedure onResize_ChildWin( integer id, integer event, sequence params ) setRect( Redt, 0, 0, params[2], params[3], 0 ) end procedure setHandler( ChildWin, w32HResize, routine_id( "onResize_ChildWin" ) ) procedure onOpen_Win( integer id, integer event, sequence params ) openWindow( ChildWin, Normal ) setRect( ChildWin, 10, 10, 370, 350, 1 ) end procedure setHandler( Win, w32HOpen, routine_id( "onOpen_Win" ) ) WinMain( Win, Normal ) ---------------------- Brian Broker wrote: > Got me... both 'SetWindowText' and message WM_SETTEXT appear to set > *both* the title and the data (on WinXP). Not sure how you'd get around > > this one. The only thing I can think of is that RichEdit controls > aren't meant to have captions(?) > > -- Brian > > > Brian Broker wrote: > > I guess I have to retract my reply since the PSDK states that "A rich > > edit control is a window in which the user can enter, edit, format, > > print, and save text." I didn't know that you could have a richedit > > control with a title... > > > > I'll have to figure out the the correct message to send to the control. > > > > -- Brian > > > > Brian Broker wrote: > > > A control is not a window. A window contains the control. Use > > > setText() on the window containing the richedit control. > > > > > > -- Brian > > > > > > > > > tone.skoda wrote: > > > > i got a simple question: > > > > how do you set window title to RichEdit control? > > > > not the data but title bar, window has style WS_CAPTION > > > > > > > > setText() changes data not title > > > > > > > > >
6. RE: RichEdit title bar text
- Posted by Bernie Ryan <xotron at localnet.com> Jun 10, 2002
- 561 views
Brian Broker wrote: > I guess this is how I would get around it. Create a child window > containing the richedit control. This way you can set the title of To me richedit is a control which is a child to some window. That window has a caption title. The title that is associated with a richedit control would be a document title. Therefore a richedit control has no caption. Bernie
7. RE: RichEdit title bar text
- Posted by Derek Parnell <Derek.Parnell at SYD.RABOBANK.COM> Jun 10, 2002
- 540 views
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C210D9.6D3E6AF0 charset=iso-8859-1 > -----Original Message----- > From: tone.skoda at gmx.net [mailto:tone.skoda at gmx.net] > Sent: Tuesday, 11 June 2002 9:37 > To: EUforum > Subject: Re: RichEdit title bar text > > > > So the answer is: there is no way you can set RichEdit caption text. > Not quite. The answer (so far) is that there is no way you can ONLY set the RichEdit caption text. The standard ways of setting the RichEdit text also set its caption. ------------ include win32lib.ew object VOID constant w = createEx(Window, "Titled", 0, 0, 0, 300, 300, 0, 0) constant re = createEx(RichEdit, "re", w, 10, 10, 200, 200, WS_CAPTION, 0) VOID = w32Func( xSetWindowText, { getHandle( re ), "My Test Caption" } ) WinMain(w, Normal) ----------------- If you want a captioned-RichEdit effect, you may have to resort to emulating the caption by using another control (eg. LText) that pretends to be its caption area. ------- Derek ================================================================== De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. ================================================================== The information contained in this message may be confidential and is intended to be exclusively for the addressee. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. ================================================================== ------_=_NextPart_000_01C210D9.6D3E6AF0 Content-Type: application/ms-tnef
8. RE: RichEdit title bar text
- Posted by Derek Parnell <Derek.Parnell at SYD.RABOBANK.COM> Jun 10, 2002
- 530 views
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C210DA.0E641470 charset=iso-8859-1 > > If you want a captioned-RichEdit effect, you may have to > resort to emulating > the caption by using another control (eg. LText) that > pretends to be its > caption area. Example: ------------------ include win32lib.ew object VOID constant w = createEx(Window, "Titled", 0, 0, 0, 300, 300, 0, 0) constant rec = createEx(LText, "My Test Caption",w, 10, 10, 200, 200, WS_BORDER, WS_EX_STATICEDGE) constant re = createEx(RichEdit, "re", rec, -2, 16, 202, 186, 0, 0) WinMain(w, Normal) ------------------ Derek. ================================================================== De informatie opgenomen in dit bericht kan vertrouwelijk zijn en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onterecht ontvangt wordt u verzocht de inhoud niet te gebruiken en de afzender direct te informeren door het bericht te retourneren. ================================================================== The information contained in this message may be confidential and is intended to be exclusively for the addressee. Should you receive this message unintentionally, please do not use the contents herein and notify the sender immediately by return e-mail. ================================================================== ------_=_NextPart_000_01C210DA.0E641470 Content-Type: application/ms-tnef