Re: Edita Requests

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

don cole wrote:
> 
> Edita Requests
> 
> The stop lite goes out when .dat files are selected.
> 
> This is good.
> 
> I would like see it go out unless a .exw, ,ex or .exu program is selected.
> 
It pretty much does that anyway???
Prompted by this, I did just change eamenus.ew, ~line 535 from:
ext = getFileExtension(filenames[currfile])
	if find(ext,{"ex","exw","exwc","htm","html","bat"})
	or (equal(ext,"") and match(untitled,filenames[currfile])=1) then

to just:
if find(getFileExtension(filenames[currfile]),
		{"ex","exw","exwc","htm","html","bat"}) then

Since there is little point having the Run button enabled for "[untitled]" and
hence unsaved filetabs, but otherwise I don't get what you mean.

It seems wrong to enable the run button for exu files on a Windows machine.
I run html and bat files from Edita all the time, no problem there either.

> Furthermore I would like to see the tabs (mine are at the bottom) color coded
> 
> in the following manner.
> 
> .ex .exw .exu --green tinted Buttonface
> 
> .e .ew .eu --yellow tinted Buttonface
> 
> .doc .dat --Buttonface
> 
> 
> I found that colors can be mixed with Buttonface color like so.
> 
>  rgb(227,220,166)) --color yellow tinted Buttonface
>  rgb(219,188,183)) --pink Buttonface
>  rgb(206,225,193)) --green tinted Buttonface
>  
>  I believe Judith's Colored Buttons would do the trick.
>  I've used them successfully with Buttons and Win32lib.
>  
>  So it should work with Tabs and Arwin.
WHOA! As you look at the 2380 lines of code that is ColouredButtons.ew, recall
that is for single static buttons - think how much more complicated all that line
drawing would be on a TCS_MULTILINE tab bar!

Anyway, I figured somthing else out:
>  
>     I remember a while back (with your help of course) that I was getting 
>  the background of the Tab text to change colors. Although I would prefer that
>  the whole Tab to change colors, this would be sufficient for my purpose.
>  
I don't recall that exactly, but I had a quick ten-minute play and found this
worked reasonably well on arwen's demo_tabs.ew. In procedure drawTabItems, ~line
4870, replace:
if and_bits(state, ODS_SELECTED) then
	void = c_func(xFillRect, {hDC, lpRect, COLOR_MENU+1})

with:
colour = ObjectBackColour[id]
    if colour=UNDEFINED then
	colour=COLOR_MENU+1
    end if
    void = c_func(xSetBkColor, {hDC, colour} )
    void = c_func(xSetBkMode, {hDC, TRANSPARENT} )
    void = c_func(xFillRect, {hDC, lpRect, colour})
    -- if the tab is selected then (i) blank the background and (ii) 
reposition text higher
    if and_bits(state, ODS_SELECTED) then
--	void = c_func(xFillRect, {hDC, lpRect, COLOR_MENU+1})

Also in arwen.ew, after procedure setTextColour, add:
global procedure setBackColour(integer id, integer colour)
    ObjectBackColour[id] = colour
    repaintWindow(id)
end procedure

global function getBackColour(integer id)
    return ObjectBackColour[id]
end function


Then finally, in demo_tabs itself, I added:
setBackColour(TABCONTROL2, c_func(xCreateSolidBrush, {Yellow}))


It might suffer some more tweaks, and definately benefit from use of more subtle
colours, but the basics are there.

Regards,
Pete

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

Search



Quick Links

User menu

Not signed in.

Misc Menu