1. Questions about IDE and perhaps Win32Lib
- Posted by Ray Tomes <rtomes at ihug.co.nz> Jun 24, 2003
- 469 views
Hi All I have been having great fun with IDE and Win32Lib. 1. One thing that I have found is that it is difficult to know in advance how things will fit in a window with lots of controls, and with multi-tabs the problem can be even greater. Big ask coming up ... Ideally I would like to be able to cut and paste a control (especially a group control) from one tab to another (BTW the tabs are virtually full window size). I cannot find any way to achieve this inside IDE so this might be a request for a new feature. If such a feature is considered it might possibly be useful to allow multiple pastes (haven't actually had a need for this - just a simple MOVE is all that I really need) in which case the control numbering would need to be adjusted each time after the first. 2. I cannot understand what a ReBar is, can someone please explain to me. 3. In Win32Lib a control can be declared as EITHER a number of pixels OR a proportion of the parent size e.g. .25 for a quarter. I tried to do this also in IDE but it didn't work. Is it possible to do this in IDE? My problem is that I am designing for a 1024x768 screen size but want to be able to have it work on any screen size and for everything to scale correctly. I don't mind calculating the correct font sizes etc myself. How do other people deal with this? I see some windows that when resized a big gray area appears which is pretty useless. One thought that I had was to use say an 8 grid on 1024x768 and this could rescale to 6 or 10 or 12 for other screen sizes without any odd fractions developing. Fonts would also be changed by the same proportions so that the text filled buttons equally. The problem is that if a window has fonts suitable for a 800x600 screen size then the fonts are far to small on a 1280x960 screen size and if the font size is increased then the buttons will also need to be larger (in pixels). Ray Tomes
2. Re: Questions about IDE and perhaps Win32Lib
- Posted by Derek Parnell <ddparnell at bigpond.com> Jun 24, 2003
- 458 views
On Tue, 24 Jun 2003 19:52:16 +1200 (06/24/03 17:52:16) , Ray Tomes <rtomes at ihug.co.nz> wrote: > > > Hi All > > I have been having great fun with IDE and Win32Lib. Yeah, so have I [snip] > > 2. I cannot understand what a ReBar is, can someone please explain to me. It is a Resizable Toolbar. See the demo\rebar.exw example with comes with the win32lib library. > 3. In Win32Lib a control can be declared as EITHER a number of pixels OR > a proportion of the parent size e.g. .25 for a quarter. I tried to do > this also in IDE but it didn't work. Is it possible to do this in IDE? Win32lib also allows for some other predefined placement parameters, such as Center, w32Edge, w32AltEdge too. > My problem is that I am designing for a 1024x768 screen size but want to > be able to have it work on any screen size and for everything to scale > correctly. I don't mind calculating the correct font sizes etc myself. > > How do other people deal with this? I see some windows that when resized > a big gray area appears which is pretty useless. This is never an easy thing to do. The basic trick is to keep the 'normal' layout simple so that when you have to resize things, there is not much to do and very little interactoin between controls. It is not normal to alter the font sizes though. -- cheers, Derek Parnell
3. Re: Questions about IDE and perhaps Win32Lib
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Jun 24, 2003
- 456 views
On Tue, 24 Jun 2003 19:52:16 +1200, Ray Tomes <rtomes at ihug.co.nz> wrote: >My problem is that I am designing for a 1024x768 screen size but want to= =20 >be able to have it work on any screen size and for everything to scale=20 >correctly. I don't mind calculating the correct font sizes etc myself. > >How do other people deal with this? I see some windows that when resized= a=20 >big gray area appears which is pretty useless. I did a little of this in MEditor, mainly because it had been developed on different monitor & font size settings. It took a fair amount of fiddling, even though as you might imagine, a text editor has only a few pop-up windows and most are relatively trivial. As with performance optimisation, it is not a bad idea to get the whole thing working first, on your basic settings. Maybe later in the project, spend a week developing in each of the other resolutions you need to support. Some code for font size detection, if you don't know: integer lf -- use large fonts object hdc, iDPI lf =3D 0 hdc =3D getDC(Screen) iDPI =3D w32Func( xGetDeviceCaps, {hdc, LOGPIXELSX} ) releaseDC(hdc) --DEV should just be >96? if iDPI =3D 120 then lf=3D1 end if Yes, that little reminder has been in the code now for about 18 months The windows eventually ended up something like: constant COLOUROPTIONS =3D create( Window, "Colour Options", MAIN, 120, 70, 450+lf*50, 400+lf*100,WStyle), COLOURGROUP =3D create( Group, "Colour", COLOUROPTIONS, 5, 5, 255+lf*25, 170, 0 ), EUPHORIAWORDS =3D create( List, "Elements", COLOURGROUP, 10, 15+lf*5, 85+lf*25, 150, 0 ), FONTGROUP =3D create( Group, "Fontsize", COLOUROPTIONS, 270+lf*25, 5, 65+lf*6, 95, 0 ), etc.. Messy, is it not? And not IDE friendly. Well, anyway, that's what I did. Let me know if you have any better ideas. Pete
4. Re: Questions about IDE and perhaps Win32Lib
- Posted by Ray Tomes <rtomes at ihug.co.nz> Jun 25, 2003
- 431 views
> Ray Tomes wrote: >>My problem is that I am designing for a 1024x768 screen size but >>want to be able to have it work on any screen size and for >>everything to scale correctly. Jerry Story wrote: > My solution to that problem was: > > 1. K = <Get the screen resolution.> > > 2. Write a little function "mK()" that adjusts things to the screen > resolution. > > 3. Run all sizes and all positions of all widgets thru mK(). > > For an example see any one of most of my programs under user > contributions. Jerry that is the approach that I would take if not using IDE. But I don't see how to do that because IDE expects integers in these things and not variables I think (or am I just assuming that?). I can achieve the same as you say if I take the code generated by IDE and replace all occurrences of x, y, cx, and cy by a scaling in the way you say and do the fonts at the same time. Only disadvantage is that I cannot then go back and make changes with IDE any more. So best to do this when I am really sure that I finished all the fancy screen footwork. Jonas wrte: >If you're just interested in control placement/alignment then I would >suggest looking at Don Phillip's xControls library (in the archive) >which automatically adjusts size and placement for controls in a window >when it's resized. Thanks Jonas - I just finished trying to learn EUwinGUI, window developer, Win32Lib and IDE - how many more do I need to learn? LOL! Ray
5. Re: Questions about IDE and perhaps Win32Lib
- Posted by Ray Tomes <rtomes at ihug.co.nz> Jun 25, 2003
- 449 views
Derek Parnell wrote: >> 2. I cannot understand what a ReBar is, can someone please explain to me. > It is a Resizable Toolbar. See the demo\rebar.exw example with comes > with the win32lib library. Thanks Derek Ray