Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #794 > unrolled thread
| Started by | D.J.W. van Kooten <public@ic2remove.this.com> |
|---|---|
| First post | 2011-04-11 12:10 +0200 |
| Last post | 2011-04-13 22:18 +0000 |
| Articles | 10 — 3 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Multilineedit in splitwindow: setting the background does not work D.J.W. van Kooten <public@ic2remove.this.com> - 2011-04-11 12:10 +0200
Re: Multilineedit in splitwindow: setting the background does not work "Geoff Schaller" <geoffx@softwarexobjectives.com.au> - 2011-04-11 22:39 +0000
Re: Multilineedit in splitwindow: setting the background does not work D.J.W. van Kooten <public@ic2remove.this.com> - 2011-04-12 01:14 +0200
Re: Multilineedit in splitwindow: setting the background does not work "Geoff Schaller" <geoffx@softwarexobjectives.com.au> - 2011-04-12 22:18 +0000
Re: Multilineedit in splitwindow: setting the background does not work D.J.W. van Kooten <public@ic2remove.this.com> - 2011-04-13 08:58 +0200
Re: Multilineedit in splitwindow: setting the background does not work E®!k \\/!$$E® <nospam@nospam.com> - 2011-04-13 09:39 +0200
Re: Multilineedit in splitwindow: setting the background does not work D.J.W. van Kooten <public@ic2remove.this.com> - 2011-04-13 14:11 +0200
Re: Multilineedit in splitwindow: setting the background does not work E®!k \\/!$$E® <nospam@nospam.com> - 2011-04-13 15:25 +0200
Re: Multilineedit in splitwindow: setting the background does not work D.J.W. van Kooten <public@ic2remove.this.com> - 2011-04-13 15:36 +0200
Re: Multilineedit in splitwindow: setting the background does not work "Geoff Schaller" <geoffx@softwarexobjectives.com.au> - 2011-04-13 22:18 +0000
| From | D.J.W. van Kooten <public@ic2remove.this.com> |
|---|---|
| Date | 2011-04-11 12:10 +0200 |
| Subject | Multilineedit in splitwindow: setting the background does not work |
| Message-ID | <6gk5q69a12kam67ha0crjvc6p1i1er7gg9@4ax.com> |
We had a multilineedit on a datawindow and assigned a colour to it which is coded in the init as: oDCMailTxt:BackGround := aBrushes[1] This works. Now we replaced a part of that datawindow with a tab control on which we display a splitwindow, containing a bBrowser and this multilineedit. This works too, however assigning the background colour like above has no effect. I've added the following code, found elsewhere in the NG: In the dispatch of the control subclass I added: IF oE:Message == WM_Paint SELF:_Paint() METHOD _Paint() CLASS IC2MultiLineEdit LOCAL struPS IS _winPaintStruct LOCAL hDC AS PTR hDC:=BeginPaint( SELF:Handle(), @struPS ) SELF:_DrawBack(hDC) EndPaint( SELF:Handle(), @struPS) RETURN NIL METHOD _DrawBack(hDC) CLASS IC2MultiLineEdit LOCAL rc IS _WINRECT LOCAL X AS PTR X:=CreateSolidBrush(DWORD(_CAST,(RGB(120, 98, 10)))) AltD() GetClientRect(SELF:Handle(),@rc) // FillRect(hDC,@rc,SELF:hBkBrush) // SELF:hBkBrush is not available FillRect(hDC,@rc,X) // Temp try to assign the brush here RETURN NIL This works but no foreground is visible anymore and when I start scrolling, the text becomes visible again - on a white background.... Besides, the solidbrush was a temporary experiment as self:hBkBrush is not defined. How can I set a background in this control from the background assinged as self:Background which will display the text and remains visible? Dick
[toc] | [next] | [standalone]
| From | "Geoff Schaller" <geoffx@softwarexobjectives.com.au> |
|---|---|
| Date | 2011-04-11 22:39 +0000 |
| Message-ID | <4da3832d$0$33413$c30e37c6@exi-reader.telstra.net> |
| In reply to | #794 |
Dick, No, this won't work because you don't paint everything else and you'd need to. > multilineedit. This works too, however assigning the background colour > like above has no effect. But I would challenge this statement. The background mechanisms don't change but the way the control is refreshed certainly does. But when you say you put a split window on it, surely you meant Splitter control... not an actual window. And then you put two controls into the split control where panes would normally go. Yes? Perhaps you can make a sample app of this for review? > hDC:=BeginPaint( SELF:Handle(), @struPS ) > SELF:_DrawBack(hDC) > EndPaint( SELF:Handle(), @struPS) You should not do this. WM_PAINT messages happen faster than farts at a baked beans festival. The Drawback function is small so include that code directly into the Paint(0 method. Why cause the whole overhead for a method call in the middle of such a repetitive operation? Geoff
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <public@ic2remove.this.com> |
|---|---|
| Date | 2011-04-12 01:14 +0200 |
| Message-ID | <1f27q6d66cokn8ak9n4pfajdvcllnddl15@4ax.com> |
| In reply to | #808 |
On Mon, 11 Apr 2011 22:39:40 +0000, "Geoff Schaller"
<geoffx@softwarexobjectives.com.au> wrote:
Hello Geoff,
>> multilineedit. This works too, however assigning the background colour
>> like above has no effect.
>
>But I would challenge this statement. The background mechanisms don't
>change but the way the control is refreshed certainly does.
Ah, that explains it (great....).
>But when you >say you put a split window on it, surely you meant Splitter control...
>not an actual window. And then you put two controls into the split
>control where panes would normally go. Yes? Perhaps you can make a
>sample app of this for review?
Splitter control? Isn't that a .Net control or did I miss something
in the VO help? We just put a tab control on a datawindow. In the
postinit of the datawindow we add this code:
SELF:oSplit := EmailSplitWindow {SELF}
SELF:oDCTabControl:AppendTab (#Tab1, "E-mails", SELF:oSplit, 0)
SELF:oDCTabControl:SelectTab (#Tab1)
Then we have the usual init as in any split window, e.g. :
SELF:oDCMailTxt := MultiLineEdit{SELF, ID_SPLITMLE, Point{},
Dimension{}, EDITAUTOVSCROLL}
SELF:oDCMailTxt:BackGround := aBrushes [1] //Brush {Color {230, 242,
255}}
SELF:SetPaneClient (SELF:oDCMailTxt, 2)
SELF:SetPaneSize (Dimension {800, 150}, 2)
And as we concluded, the background coloring does not work.
>
>> hDC:=BeginPaint( SELF:Handle(), @struPS )
>> SELF:_DrawBack(hDC)
>> EndPaint( SELF:Handle(), @struPS)
>
>You should not do this. WM_PAINT messages happen faster than farts at a
>baked beans festival. The Drawback function is small so include that
>code directly into the Paint(0 method. Why cause the whole overhead for
>a method call in the middle of such a repetitive operation?
>
Basically because I saw this piece of code and have no idea how to
achieve it in another way. I hope you or anyone else has a better
idea....
Dick
>
[toc] | [prev] | [next] | [standalone]
| From | "Geoff Schaller" <geoffx@softwarexobjectives.com.au> |
|---|---|
| Date | 2011-04-12 22:18 +0000 |
| Message-ID | <4da4cfab$0$33414$c30e37c6@exi-reader.telstra.net> |
| In reply to | #809 |
No no no no... you must not do this.
2.8 gave us the split control, on which a split window is based. You
place the split control on a window because you want to put other
controls on each of the panes. To have a whole window placed on the
window is just wasteful and unnecessary overhead. Not to mention the
complexities of messages...
But the split control has its issues itself but it is nothing more than
a simple way to allow the user to set how much of each 'pane' is shown.
A good use would be a treeview on the left and a browser on the right.
Or four browsers, or three... or whatever.
Geoff
PS - I saw your aef and if your problem is unsolved by the weekend, I
will take a look.
"D.J.W. van Kooten" <public@ic2remove.this.com> wrote in message
news:1f27q6d66cokn8ak9n4pfajdvcllnddl15@4ax.com:
> On Mon, 11 Apr 2011 22:39:40 +0000, "Geoff Schaller"
> <geoffx@softwarexobjectives.com.au> wrote:
>
> Hello Geoff,
>
>
> >> multilineedit. This works too, however assigning the background colour
> >> like above has no effect.
> >
>
> >But I would challenge this statement. The background mechanisms don't
> >change but the way the control is refreshed certainly does.
>
>
> Ah, that explains it (great....).
>
>
> >But when you >say you put a split window on it, surely you meant Splitter control...
> >not an actual window. And then you put two controls into the split
> >control where panes would normally go. Yes? Perhaps you can make a
> >sample app of this for review?
>
>
> Splitter control? Isn't that a .Net control or did I miss something
> in the VO help? We just put a tab control on a datawindow. In the
> postinit of the datawindow we add this code:
>
> SELF:oSplit := EmailSplitWindow {SELF}
> SELF:oDCTabControl:AppendTab (#Tab1, "E-mails", SELF:oSplit, 0)
> SELF:oDCTabControl:SelectTab (#Tab1)
>
> Then we have the usual init as in any split window, e.g. :
>
> SELF:oDCMailTxt := MultiLineEdit{SELF, ID_SPLITMLE, Point{},
> Dimension{}, EDITAUTOVSCROLL}
> SELF:oDCMailTxt:BackGround := aBrushes [1] //Brush {Color {230, 242,
> 255}}
> SELF:SetPaneClient (SELF:oDCMailTxt, 2)
> SELF:SetPaneSize (Dimension {800, 150}, 2)
>
> And as we concluded, the background coloring does not work.
>
>
> >
>
> >> hDC:=BeginPaint( SELF:Handle(), @struPS )
> >> SELF:_DrawBack(hDC)
> >> EndPaint( SELF:Handle(), @struPS)
> >
>
> >You should not do this. WM_PAINT messages happen faster than farts at a
> >baked beans festival. The Drawback function is small so include that
> >code directly into the Paint(0 method. Why cause the whole overhead for
> >a method call in the middle of such a repetitive operation?
> >
>
> Basically because I saw this piece of code and have no idea how to
> achieve it in another way. I hope you or anyone else has a better
> idea....
>
> Dick
>
> >
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <public@ic2remove.this.com> |
|---|---|
| Date | 2011-04-13 08:58 +0200 |
| Message-ID | <54iaq6t28jvg421g7rclr11lv5n1rv45ku@4ax.com> |
| In reply to | #835 |
On Tue, 12 Apr 2011 22:18:19 +0000, "Geoff Schaller" <geoffx@softwarexobjectives.com.au> wrote: Hello Geoff, >No no no no... you must not do this. > >2.8 gave us the split control, on which a split window is based. This time you may call me an idiot <g> but where do you see a splitcontrol in 2.8? I can only find "Splitwindow" in the help file and I've doublechecked all entries in my control window of the window editor but I don't see a splitcontrol. I've seen it in .Net, not in VO. >PS - I saw your aef and if your problem is unsolved by the weekend, I >will take a look. Thank you, much appreciated. You are more familiair with how the events interact. Something is not working right but we have found no way to work around that yet. Dick
[toc] | [prev] | [next] | [standalone]
| From | E®!k \\/!$$E® <nospam@nospam.com> |
|---|---|
| Date | 2011-04-13 09:39 +0200 |
| Message-ID | <90l2a8Fms2U1@mid.individual.net> |
| In reply to | #839 |
Hi Dick, It is called __SplitView. Some people suggest to have a look at the SDK once in a while. They are not completly wrong....<g> The Splitwindow nowadays is a ChildAppWindow with a __Splitview control on it. So the SDK can tell you how to put such a control on a form. HTH Erik "D.J.W. van Kooten" wrote in message news:54iaq6t28jvg421g7rclr11lv5n1rv45ku@4ax.com... On Tue, 12 Apr 2011 22:18:19 +0000, "Geoff Schaller" <geoffx@softwarexobjectives.com.au> wrote: Hello Geoff, >No no no no... you must not do this. > >2.8 gave us the split control, on which a split window is based. This time you may call me an idiot <g> but where do you see a splitcontrol in 2.8? I can only find "Splitwindow" in the help file and I've doublechecked all entries in my control window of the window editor but I don't see a splitcontrol. I've seen it in .Net, not in VO. >PS - I saw your aef and if your problem is unsolved by the weekend, I >will take a look. Thank you, much appreciated. You are more familiair with how the events interact. Something is not working right but we have found no way to work around that yet. Dick
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <public@ic2remove.this.com> |
|---|---|
| Date | 2011-04-13 14:11 +0200 |
| Message-ID | <ur3bq6lsf80gfejhd6202albhi1v09nj2o@4ax.com> |
| In reply to | #840 |
On Wed, 13 Apr 2011 09:39:53 +0200, E®!k \\/!$$E® <nospam@nospam.com> wrote: >Hi Dick, >It is called __SplitView. > >Some people suggest to have a look at the SDK once in a while. They are not >completly wrong....<g> > >The Splitwindow nowadays is a ChildAppWindow with a __Splitview control on >it. >So the SDK can tell you how to put such a control on a form. > Hello Erik, It looks like it's some half finished thing I would say, otherwise I would expect it to be selectable and insertable from the control window, and findable in the normal VO help. As a programmer the first thing what I would do when I want a control is look in the tooltips of that control window if it's there. The next is the Seek tab of the help. Now I know that I have to go with the keywords to the What's new guide and the SDK to see if Grafx has well hidden some gems in there too while other controls which have been left out in the normal programmers environment for mysterious reasons.... Dick
[toc] | [prev] | [next] | [standalone]
| From | E®!k \\/!$$E® <nospam@nospam.com> |
|---|---|
| Date | 2011-04-13 15:25 +0200 |
| Message-ID | <90lmhgFh7hU1@mid.individual.net> |
| In reply to | #847 |
Hi Dick, At first, it is not my ambition or intention to defend Grafx, Robert or VO in any way. But.... Well you cannot say it to much work to read the Whatsnew all the time an update arrives.... <g> The double underscore is commonly used for internal classes, methods and functions. That is (i think) why this control is not available on the usual places. On the other hand, the toolpallet window has an open structure, you are able to add controls yourself. Although this control is ment to be internal, it can be used: <snip Whatsnew 2.8> __SplitView Class (new) From this version, the control class __SplitView can also be used as a single control. It can be placed on every window like all other controls. In order to enable this the following methods were changed: __SplitView:Destroy() __SplitView:Layout ASSIGN __SplitView:Init() New Methods: • __SplitView:GetAllPaneClients() Returns all available pane clients of the __SplitView control. • SplitWindow:ToolBarHeightChanged() This is needed if a SplitWindow has a Rebar and the user rearranges the bands, so that the size of the Rebar control is changed. </snip> greetings from the Top of Holland, Erik "D.J.W. van Kooten" wrote in message news:ur3bq6lsf80gfejhd6202albhi1v09nj2o@4ax.com... On Wed, 13 Apr 2011 09:39:53 +0200, E®!k \\/!$$E® <nospam@nospam.com> wrote: >Hi Dick, >It is called __SplitView. > >Some people suggest to have a look at the SDK once in a while. They are >not >completly wrong....<g> > >The Splitwindow nowadays is a ChildAppWindow with a __Splitview control on >it. >So the SDK can tell you how to put such a control on a form. > Hello Erik, It looks like it's some half finished thing I would say, otherwise I would expect it to be selectable and insertable from the control window, and findable in the normal VO help. As a programmer the first thing what I would do when I want a control is look in the tooltips of that control window if it's there. The next is the Seek tab of the help. Now I know that I have to go with the keywords to the What's new guide and the SDK to see if Grafx has well hidden some gems in there too while other controls which have been left out in the normal programmers environment for mysterious reasons.... Dick
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <public@ic2remove.this.com> |
|---|---|
| Date | 2011-04-13 15:36 +0200 |
| Message-ID | <ve9bq6dh4q9o6bcfubs06nao4ra9pnkqhf@4ax.com> |
| In reply to | #849 |
On Wed, 13 Apr 2011 15:25:04 +0200, E®!k \\/!$$E® <nospam@nospam.com> wrote: Hello Erik, > >At first, it is not my ambition or intention to defend Grafx, Robert or VO >in any way. You're kidding <bg> >But.... > >Well you cannot say it to much work to read the Whatsnew all the time an >update arrives.... Right. That was 15-5-2007. I admire you and Geoff that you remember every addition of this 48 pages long document and can reproduce it 3 years and 11 months after it has been introduced. For me when I look for a control a What's new of that long ago is not the first thing I look into and I unfortunately don't have a photographic memory for added features either. Dick
[toc] | [prev] | [next] | [standalone]
| From | "Geoff Schaller" <geoffx@softwarexobjectives.com.au> |
|---|---|
| Date | 2011-04-13 22:18 +0000 |
| Message-ID | <4da6211e$0$33417$c30e37c6@exi-reader.telstra.net> |
| In reply to | #850 |
Dick, The issue here is that Sven helped Brian by isolating out the splitter component of the split window class - it was something a lot of people constantly requested (every other language has this) - and something that should have been done up front in the original version. As with things like 'data aware' windows, VO was over-coded in the early days. The problem was that by this stage Brian ran out of money and so there were no further updates to the Help for such things. Unfortunately you need the What's New as much as the Help to find them. Geoff "D.J.W. van Kooten" <public@ic2remove.this.com> wrote in message news:ve9bq6dh4q9o6bcfubs06nao4ra9pnkqhf@4ax.com: > On Wed, 13 Apr 2011 15:25:04 +0200, ER!k \\/!$$ER <nospam@nospam.com> > wrote: > > Hello Erik, > > > > >At first, it is not my ambition or intention to defend Grafx, Robert or VO > >in any way. > > > You're kidding <bg> > > > >But.... > > > >Well you cannot say it to much work to read the Whatsnew all the time an > >update arrives.... > > > Right. That was 15-5-2007. I admire you and Geoff that you remember > every addition of this 48 pages long document and can reproduce it 3 > years and 11 months after it has been introduced. For me when I look > for a control a What's new of that long ago is not the first thing I > look into and I unfortunately don't have a photographic memory for > added features either. > > Dick
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web