1. Block Text in Win32lib

Hello,

When I am programming using the win32lib, when I try to use an LText control, it shows up as a big black chunky bar. It also, only does if I am putting it on a TabItem control. I am wondering if there is a work-around this?

I'm using Euphoria 4.0.5 Win32lib 0.70.1 Windows 7 Ultimate 64-bit OS 4GB RAM

constant Hero_List = createEx(ListBox,"",Tab_Hero,10,30,150,650,0,0), 
Hero_List_Add = createEx(PushButton,"Add",Tab_Hero,10,680,60,25,0,0), 
Hero_List_Remove = createEx(PushButton,"Remove",Tab_Hero,70,680,60,25,0,0), 
Hero_Name_Text = createEx(LText,"Name:",Tab_Hero,170,30,30,20,0,0) 

The above is just part of my code, mostly where the big black bar is appearing when I run the program.

new topic     » topic index » view message » categorize

2. Re: Block Text in Win32lib

Hi

This issue has been reported before.

http://openeuphoria.org/forum/116922.wc#116922

and

http://openeuphoria.org/forum/114950.wc#114950

But I still don't think there's any fix for it. The best I can suggest is that if you are one of the luccky ones using win32lib who it doesn't affect, if you aren't then switch to another gui library.

Chris

new topic     » goto parent     » topic index » view message » categorize

3. Re: Block Text in Win32lib

Really? I was hoping there would be a fix for it by now. I guess I could use another GUI library, but I have made progress on this project using win32lib. wxWidgets would be a good choice, though GTK looks good, but I don't think there's a windows version for version 3 of GTK yet of a Euphoria wrapper. However, I could make one for windows.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Block Text in Win32lib

Hi

Yes, the original developer of win32lib retired, and no one really took it on, though Derek has kept a fairly light touch on it, and there is a restructured Win32lib in the archive which I haven't investigated (though I suspect you might still get the manifest (blocky text)) problem. I use euwingui quite a lot for small programs, though I think that Redy looks quite promising. EuGTK and WxEuphoria are very good candidates for a more comprehensive widget list.

Chris

new topic     » goto parent     » topic index » view message » categorize

5. Re: Block Text in Win32lib

ChrisB said...

Hi

Yes, the original developer of win32lib retired, and no one really took it on, though Derek has kept a fairly light touch on it, and there is a restructured Win32lib in the archive which I haven't investigated (though I suspect you might still get the manifest (blocky text)) problem. I use euwingui quite a lot for small programs, though I think that Redy looks quite promising. EuGTK and WxEuphoria are very good candidates for a more comprehensive widget list.

Chris

Yes, Win32lib could use some work. Redy does look quite promising indeed. However for this project, I will need a full widget set. So I'm probably going to look in to EuGTK or wxEuphoria, or perhaps possibly take a swing at developing/reviving the win32lib.

new topic     » goto parent     » topic index » view message » categorize

6. Re: Block Text in Win32lib

Icy_Viking said...

Really? I was hoping there would be a fix for it by now. I guess I could use another GUI library, but I have made progress on this project using win32lib. wxWidgets would be a good choice, though GTK looks good, but I don't think there's a windows version for version 3 of GTK yet of a Euphoria wrapper. However, I could make one for windows.

EuGTK 4.9.2 is looking good on Windows, with some minor exceptions related to svga images - solution: use other types of image, and missing themes (supply your own special icons). GTK for Windows is at version 3.6.4, so it is missing a few new features, none of them critical. A stripped-down set of 64-bit Windows dll's along with EuGTK 4.9.2 is available here: https://sites.google.com/site/euphoriagtk/ , and full sets of GTK 3 for 32 bit Windows, OSX, etc. can be downloaded from http://www.gtk.org/download/index.php.

That said, I need someone who is familiar with Windows to work out some details, such as where is the correct place to put the dll's, what to do about themes, and minor problems such as printer fonts having to be different sizes on Windows vs. Linux.

Hopefully, someone will help with these things so that I can include the fixes in the next update at the end of the month. Things are working so well now that I have moved from updating EuGTK itself to writting 'helper' modules, such as pre-built file dialogs, font dialogs, about dialogs, etc. which can be called with one line of code, rather than having to set up a bunch of options each time. Those will be in the next release.

EuGTK programs seem (to me, at least) to be much easier to write, since GTK was designed in an object-oriented way. And the GTK documentation is not only better organized than Windows API, but is a whole lot smaller. Small is good:)

new topic     » goto parent     » topic index » view message » categorize

7. Re: Block Text in Win32lib

irv said...
Icy_Viking said...

Really? I was hoping there would be a fix for it by now. I guess I could use another GUI library, but I have made progress on this project using win32lib. wxWidgets would be a good choice, though GTK looks good, but I don't think there's a windows version for version 3 of GTK yet of a Euphoria wrapper. However, I could make one for windows.

EuGTK 4.9.2 is looking good on Windows, with some minor exceptions related to svga images - solution: use other types of image, and missing themes (supply your own special icons). GTK for Windows is at version 3.6.4, so it is missing a few new features, none of them critical. A stripped-down set of 64-bit Windows dll's along with EuGTK 4.9.2 is available here: https://sites.google.com/site/euphoriagtk/ , and full sets of GTK 3 for 32 bit Windows, OSX, etc. can be downloaded from http://www.gtk.org/download/index.php.

That said, I need someone who is familiar with Windows to work out some details, such as where is the correct place to put the dll's, what to do about themes, and minor problems such as printer fonts having to be different sizes on Windows vs. Linux.

Hopefully, someone will help with these things so that I can include the fixes in the next update at the end of the month. Things are working so well now that I have moved from updating EuGTK itself to writting 'helper' modules, such as pre-built file dialogs, font dialogs, about dialogs, etc. which can be called with one line of code, rather than having to set up a bunch of options each time. Those will be in the next release.

EuGTK programs seem (to me, at least) to be much easier to write, since GTK was designed in an object-oriented way. And the GTK documentation is not only better organized than Windows API, but is a whole lot smaller. Small is good:)

I was thinking of using the GTK windows bundle that is currently available under GTK's site and making a wrapper with that. I'd be using the 32-bit DLLs, as I'd assume that would allow for more compatibility between systems.

new topic     » goto parent     » topic index » view message » categorize

8. Re: Block Text in Win32lib

Icy_Viking said...
ChrisB said...

Hi

Yes, the original developer of win32lib retired, and no one really took it on, though Derek has kept a fairly light touch on it, and there is a restructured Win32lib in the archive which I haven't investigated (though I suspect you might still get the manifest (blocky text)) problem. I use euwingui quite a lot for small programs, though I think that Redy looks quite promising. EuGTK and WxEuphoria are very good candidates for a more comprehensive widget list.

Chris

Yes, Win32lib could use some work. Redy does look quite promising indeed. However for this project, I will need a full widget set. So I'm probably going to look in to EuGTK or wxEuphoria, or perhaps possibly take a swing at developing/reviving the win32lib.

Unfortunately, Redy's widget toolkit is incomplete. I am working on the next release, which will have major new features, but i'm not sure when it will be finished.

new topic     » goto parent     » topic index » view message » categorize

9. Re: Block Text in Win32lib

ryanj said...
Icy_Viking said...
ChrisB said...

Hi

Yes, the original developer of win32lib retired, and no one really took it on, though Derek has kept a fairly light touch on it, and there is a restructured Win32lib in the archive which I haven't investigated (though I suspect you might still get the manifest (blocky text)) problem. I use euwingui quite a lot for small programs, though I think that Redy looks quite promising. EuGTK and WxEuphoria are very good candidates for a more comprehensive widget list.

Chris

Yes, Win32lib could use some work. Redy does look quite promising indeed. However for this project, I will need a full widget set. So I'm probably going to look in to EuGTK or wxEuphoria, or perhaps possibly take a swing at developing/reviving the win32lib.

Unfortunately, Redy's widget toolkit is incomplete. I am working on the next release, which will have major new features, but i'm not sure when it will be finished.

I am currently working on my own GTK wrapper for windows. Its using the 3.6.4, I know its not the newest, but its the newest one for windows. So many underscores in the GTK library.

new topic     » goto parent     » topic index » view message » categorize

10. Re: Block Text in Win32lib

Icy_Viking said...

I am currently working on my own GTK wrapper for windows.

Why? Wouldn't it be faster to use the windoze version of EuGTK?

new topic     » goto parent     » topic index » view message » categorize

11. Re: Block Text in Win32lib

Icy_Viking said...

I am currently working on my own GTK wrapper for windows. Its using the 3.6.4, I know its not the newest, but its the newest one for windows. So many underscores in the GTK library.

I would encourage anyone who wants to make Euphoria more useful, but I do have to point out something that should be obvious: writing a usable Euphoria/GUI wrapper is a huge task, whether for Windows, GTK, Qt, Wx, or whatever. Wouldn't it be a lot more productive to spend your time improving something that is already usable, something already, let's say, 90% or more complete?

Also, let me say that EuGTK is unlikely to ever be entirely satisfactory on Windows, for the reason you point out - the Gtk/Windows dlls always lag behind the current GTK version. And for a reason you didn't mention - it will always be another wedge between the user and the os. A wedge that has to be kept up to date with Windows as well as with GTK. Twice as much work. Four times as much testing.

Don't forget that there are people who just don't want to run GTK on Windows, just as there are people who don't want to run Windows programs on Linux, using Wine. Even if it works perfectly, it just doesn't 'feel right' somehow.

Actually, if we could get the same Euphoria source code to run on all 3 platforms, that would be ideal. We'd simply include a different 'engine' for GTK, Windows, or whatever, and we'd get similar results. Similar, but not identical, since each platform has its own look and feel.

For a while, I thought I might be able to rewrite the 'guts' of EuGTK - basically, the widget[] structure, which is just one big array of call prototypes - to call Windows functions. Then I realized that there is just too much difference between GTK and Windows designs to allow this to work. Object-oriented vs. not, automatic layout vs. manual, the differences go on and on. If someone smarter than me can do this - please step forward. I am willing to help.

new topic     » goto parent     » topic index » view message » categorize

12. Re: Block Text in Win32lib

irv said...

For a while, I thought I might be able to rewrite the 'guts' of EuGTK - basically, the widget[] structure, which is just one big array of call prototypes - to call Windows functions. Then I realized that there is just too much difference between GTK and Windows designs to allow this to work. Object-oriented vs. not, automatic layout vs. manual, the differences go on and on. If someone smarter than me can do this - please step forward. I am willing to help.



Short of time as I am, I will download EuGTK and study it to try and
find out a 'work-around' for the issues mentioned.

My thoughts are going towards an extended case... endcase- solution, where the cases would be:
case Windows...
case GTK.........
case Mac.........


Would such solution be possible in your opinion, Irv?

new topic     » goto parent     » topic index » view message » categorize

13. Re: Block Text in Win32lib

Ekhnat0n said...

Short of time as I am, I will download EuGTK and study it to try and
find out a 'work-around' for the issues mentioned.

My thoughts are going towards an extended case... endcase- solution, where the cases would be:
case Windows...
case GTK.........
case Mac.........


Would such solution be possible in your opinion, Irv?

Anything's possible - but that sure wouldn't be the preferred way. Better perhaps to have 2 (or 3) files, and include the correct one with ifdefs.

However, that wouldn't even begin to address the real problem, which is the fundamental design difference between GTK and Windows. One example: you'd either have to write a automatic sizing and layout routines, so that Windows would work like GTK, or you'd have to fundamentally break GTK so that you could use fixed sizing and layouts. Doing that would lead to even bigger problems with other things.

If you didn't fix the Windows code so it worked like GTK, then you wouldn't have code that was cross-platform. And that, unless I misunderstand, is the goal here.

new topic     » goto parent     » topic index » view message » categorize

14. Re: Block Text in Win32lib

irv said...

or you'd have to fundamentally break GTK so that you could use fixed sizing and layouts. Doing that would lead to even bigger problems with other things.

That's what I ended up doing with llamagtk, back in the days when GTK 1.2 was new.

new topic     » goto parent     » topic index » view message » categorize

15. Re: Block Text in Win32lib

irv said...

Anything's possible - but that sure wouldn't be the preferred way. Better perhaps to have 2 (or 3) files, and include the correct one with ifdefs.



I fully agree Irv. It has been too long I did any Euphoria-programming so
I forgot abt. the ifdef possibility.
That would be the most elegant way to solve this matter indeed.

AND... it will be easier too, to implement solutions for the OOP/non-OOP etc.
I really think a small group on this forum should create a
dedicated think-tank to come up with what would have to be included in each
platform-specific include-file.
OR we might have a topic like the one I started on WHAT do you want in OpenEu.

Please react if you so wish by mailing me personally at nyellorion@live.nl

new topic     » goto parent     » topic index » view message » categorize

16. Re: Block Text in Win32lib

irv said...

I would encourage anyone who wants to make Euphoria more useful, but I do have to point out something that should be obvious: writing a usable Euphoria/GUI wrapper is a huge task, whether for Windows, GTK, Qt, Wx, or whatever. Wouldn't it be a lot more productive to spend your time improving something that is already usable, something already, let's say, 90% or more complete?

Also, let me say that EuGTK is unlikely to ever be entirely satisfactory on Windows, for the reason you point out - the Gtk/Windows dlls always lag behind the current GTK version. And for a reason you didn't mention - it will always be another wedge between the user and the os. A wedge that has to be kept up to date with Windows as well as with GTK. Twice as much work. Four times as much testing.

Don't forget that there are people who just don't want to run GTK on Windows, just as there are people who don't want to run Windows programs on Linux, using Wine. Even if it works perfectly, it just doesn't 'feel right' somehow.

Actually, if we could get the same Euphoria source code to run on all 3 platforms, that would be ideal. We'd simply include a different 'engine' for GTK, Windows, or whatever, and we'd get similar results. Similar, but not identical, since each platform has its own look and feel.

For a while, I thought I might be able to rewrite the 'guts' of EuGTK - basically, the widget[] structure, which is just one big array of call prototypes - to call Windows functions. Then I realized that there is just too much difference between GTK and Windows designs to allow this to work. Object-oriented vs. not, automatic layout vs. manual, the differences go on and on. If someone smarter than me can do this - please step forward. I am willing to help.

Good points. One of the main reasons i decided to make a widget toolkit in Euphoria from scratch was to bypass all the issues with different widget toolkit designs on different platforms. The amount of api that has to be accessed on each platform is greatly reduced, and platform-specific code is compartmentalized.

new topic     » goto parent     » topic index » view message » categorize

17. Re: Block Text in Win32lib

Well I haven't gotten very far in writing my own wrapper for GTK. However, I could look more into the win32lib and figure out what is causing the blocky text and try to fix that bug.

new topic     » goto parent     » topic index » view message » categorize

18. Re: Block Text in Win32lib

I have to partially retract what I wrote earlier.

I spent the day testing all 200 basic EuGTK test programs on Windows 7, and all but 3 or 4 ran perfectly, and look identical to, if not better, than similar Windows programs.

The only difficulties were:

1. svga images, but I think that's a Windows problem, since Windows Explorer can't display thumbnails of svga pix either.

2. theme icons - I may not even know how to install icon themes for GTK under Windows.

Both of these problems are easily avoided by doing what Windows programmers have done for ages: ship the icons along with your program.

3. latest 'widgets' not available. There are a few (2 or 3) new widgets just added to Gtk 3.14, obviously they don't work on Windows, which is using 3.6 or so.

4. pixbufs can't be resized 'on-the-fly'. Again, not a show-stopper, and I think I may be able to fix this one.

new topic     » goto parent     » topic index » view message » categorize

19. Re: Block Text in Win32lib

I think you are being misled about win32lib.

The original point (blackened out text) is a result of MS Windows policy/practice regarding Visual Styles (see for example https://msdn.microsoft.com/en-us/library/windows/desktop/bb773187%28v=vs.85%29.aspx) and the fact that Euphoria 4.0.0 & onwards is, by default, compiled with a manifest. To address your problem you could try a different (earlier) version of win32lib (the latest "corrects" this problem but causes others, especially with regard to controls on children of other controls) or JM Duro's re-casting of the library (see the Archive) instead. Failing these you could try a manifest-free version of the interpreter (see http://euphoria.indonesianet.de/ - eu4testpack) - I find this works in circumstances where the other "solutions" don't. It seems to be (as suggested) a rather hit-and-miss situation with regard to individual machine/OS setups, although I am sure there is a pattern.

Win32lib is, as indicated, in the care of Derek Parnell and will, I am sure, one day be re-issued in a form more suitable for the present-day Euphoria. It is actively being worked upon. (The stuff about a retired creator is nonsense. David Cuny was the originator.)

Moreover the accompanying Form Designer/IDE is also being actively maintained and currently being tuned for Euphoria 4. I know 'cos I'm doing it!

new topic     » goto parent     » topic index » view message » categorize

20. Re: Block Text in Win32lib

Hi

Feel I must reply to this. I may have been mistaken, but I don't think I misled.

Forgive me if I'm wrong, but Mr Cuny has just returned to Eu, and effectively had retired from Win32Lib maintanance. Judith Evans the creator of the win32lib IDE has indeed retired, and Derek, with the greatest respect in the world to Derek, has not been the most vocal or prolific maintainer of win32lib (not a criticism, we all have other lives)

It might have been nice to have some heads up that you were maintaining the IDE, as obviously the comment that I made was based in incomplete information.

However, my original comment still stands, there are other less problemmatical toolkits available for program creation than win32lib/IDE.

Chris

new topic     » goto parent     » topic index » view message » categorize

21. Re: Block Text in Win32lib

Hallo

dr_can said...

I think you are being misled about win32lib.

The original point (blackened out text) is a result of MS Windows policy/practice regarding Visual Styles (see for example https://msdn.microsoft.com/en-us/library/windows/desktop/bb773187%28v=vs.85%29.aspx) and the fact that Euphoria 4.0.0 & onwards is, by default, compiled with a manifest. To address your problem you could try a different (earlier) version of win32lib (the latest "corrects" this problem but causes others, especially with regard to controls on children of other controls) or JM Duro's re-casting of the library (see the Archive) instead. Failing these you could try a manifest-free version of the interpreter (see http://euphoria.indonesianet.de/ - eu4testpack) - I find this works in circumstances where the other "solutions" don't. It seems to be (as suggested) a rather hit-and-miss situation with regard to individual machine/OS setups, although I am sure there is a pattern.

Win32lib is, as indicated, in the care of Derek Parnell and will, I am sure, one day be re-issued in a form more suitable for the present-day Euphoria. It is actively being worked upon. (The stuff about a retired creator is nonsense. David Cuny was the originator.)

Moreover the accompanying Form Designer/IDE is also being actively maintained and currently being tuned for Euphoria 4. I know 'cos I'm doing it!

The working link is http://euphoria.indonesianet.de/eu4testpack.zip

But it is from June 2013, i do not think it will help with Win8 and above. (i'am willing to provide newer builds if someone needs them)

Andreas

new topic     » goto parent     » topic index » view message » categorize

22. Re: Block Text in Win32lib

Good to see that some solutions are being worked on. I hope work does resume on win32lib, it is still one of the best libraries to use for windows development. I also find it good that the work is being resume on the IDE, I always liked the code editor that was included in that IDE package. I also think Redy will be a nice solution once it is more mature. I also hope Euphoria 4.1 will be out soon, I also hope it will have struct feature implemented.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu