Re: Edita Requests

new topic     » goto parent     » topic index » view thread      » older message » newer message

Pete Lomax wrote:
> 
> don cole wrote:
> > 
> > Pete Lomax wrote:
> > > 
> > > Are you saying that "dcole.zip" does not work? 
> > 
> > No that works fine. If I change the color of the text with
> > setTextColour(TABCONTROL2,White).
> > That works ok.
> > 
> > If I change the background with  setBackColour(TABCONTROL2,#FFFFFF). The
> > background
> > always turns white and text black no matter what color I put in there.
> 
> That would be because you have rudely deleted the CreateBrush part.
> 
> Here is a mod whereby setBackColour() accepts a colourref, which is more
> natural
> and correct than passing a brush anyway, and drawTabItems manages any brushes
> needed internally:
> 
> Insert before drawTabItems:

Do you mean insert this outside of the drawTabItems() procedure?

> }}}
<eucode>
> sequence drawTabColours, drawTabBrushes
> 	 drawTabColours={} drawTabBrushes={}
> integer k
> atom colour,brush
> </eucode>
{{{

> 
> and find the first/last lines of this block in routine drawTabItems() and
> replace
> everything between with:
> }}}
<eucode>
>     if colour=UNDEFINED then
> 	colour=COLOR_MENU+1
> 	brush=colour
>     else
> 	k = find(colour,drawTabColours)
> 	if k then
> 	    brush=drawTabBrushes[k] 
> 	else
> 	    drawTabColours=append(drawTabColours,colour)
> 	    brush=c_func(xCreateSolidBrush, {colour})
> 	    drawTabBrushes=append(drawTabBrushes,brush)
> 	end if
>     end if

   If I insert colour = Yellow here it works, all tabs turn backgroung yellow.

But I can't figure out how to send the back ground color over from the demo.
I'm not sure how to change background of each tab individually 
I'm sure it has to do with ObjectChildren[id].

>     void = c_func(xSetBkColor, {hDC, colour} )
>     void = c_func(xSetBkMode, {hDC, TRANSPARENT} )
> --  void = c_func(xFillRect, {hDC, lpRect, colour})
>     void = c_func(xFillRect, {hDC, lpRect, brush})
>     if and_bits(state, ODS_SELECTED) then
> }}}
<eucode>
> 
> Regards,
> Pete

Hello Pete,

I'm about to give up on this. I've tried you code several ways but I can't
   seem to get the backcolor to work.

If I could get started on this I'm sure I could work out the details.

Thanks for trying,

Don Cole

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu