PureRESIZE library : gadget automatic resizing and more

All PureFORM, JaPBe, Libs and useful code maintained by gnozal

Moderator: gnozal

danraymond
User
User
Posts: 43
Joined: Wed Jun 28, 2006 6:02 am

Thank you

Post by danraymond »

Thanks gnozal,

works a treat, problem was my understanding of what locking meant. also was not sure if parent gadget inlcuded the actual window, whihc I see now it doesn't

you've saved me a lot of work,

thank you.

DanRaymond
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update (PB4 lib only)

Changes :
- Added thread safe library version
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update (PB4 version only)

Changes :
- added unicode / unicode+threadsafe versions
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
quasiperfect
Enthusiast
Enthusiast
Posts: 157
Joined: Tue Feb 13, 2007 6:16 pm
Location: Romania
Contact:

threadsafe

Post by quasiperfect »

hi

pureresize is not threadsafe in p4.02 ?
i completed a form with PureForm and when i try to compile with threadsafe option on i get a linker error : " POLINK: error : Unresolved external symbol
'_PB_StringBasePosition' "
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: threadsafe

Post by gnozal »

quasiperfect wrote:pureresize is not threadsafe in p4.02 ?
It should be ...
quasiperfect wrote:i completed a form with PureForm and when i try to compile with threadsafe option on i get a linker error : " POLINK: error : Unresolved external symbol '_PB_StringBasePosition' "
Did you use the threadsafe library version ?
PureRESIZE.chm wrote:How to use this library in unicode and/or thread-safe mode

This library exists in several versions :
- the standard version, located in %Purebasic%\PureLibraries\UserLibraries\ ;
- the thread-safe version, located in %Purebasic%\SubSystems\UserLibThreadSafe\PureLibraries\ .
- the unicode version, located in %Purebasic%\SubSystems\UserLibUnicode\PureLibraries\ .
- the unicode + thread-safe version, located in %Purebasic%\SubSystems\UserLibunicodeThreadSafe\PureLibraries\ .
In order to use this library in thread-safe mode (compiler option /THREAD), you have to enable the subsystem 'UserLibThreadSafe' in the PB IDE, or add '/SUBSYSTEM UserLibThreadSafe' to the PBCompiler arguments. In jaPBe, do nothing : it will automatically enable the 'UserLibThreadSafe' subsystem to use the threadsafe versions of the installed userlibraries.
It's the same logic for unicode and unicode + thread-safe modes.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
quasiperfect
Enthusiast
Enthusiast
Posts: 157
Joined: Tue Feb 13, 2007 6:16 pm
Location: Romania
Contact:

oops

Post by quasiperfect »

my bad i was using the wrong lib
sorry about this
storck
User
User
Posts: 83
Joined: Sat Oct 18, 2003 4:56 pm
Location: Sweden

Keeping a control centered

Post by storck »

Hi!

I have a window with a button in the lower part. I want that button to stay horizontally centered. In for example Borland Turbo C++ Explorer I can do this with anchor bottom. If I do the same thing in PureRESIZE the control does not stay centered. I find the Borland behavior very usefule. Is there a way to do this in PureRESIZE or could it be implemented? I do understand that changing the way it works now would destroy a lot of peoples code and that this is no option. Also features like align client to make a component fill an entire window is very useful. Any chances for that in a very future version?

Regards,

Storck
Last edited by storck on Fri Feb 23, 2007 11:33 pm, edited 1 time in total.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: Keeping a control centered

Post by gnozal »

storck wrote:I have a window with a button in the lower part. I want that button to stay horizontally centered. In for example Borland Turbo C++ Explorer I can do this with anchor bottom. If I do the same thing in PureRESIZE the control does not stay centered. I find the Borland behavior very usefule.
It's not possible with PureRESIZE.
storck wrote: Also features like align all client to make a component fill an entire window is very useful.
I don't understand what you mean here.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
storck
User
User
Posts: 83
Joined: Sat Oct 18, 2003 4:56 pm
Location: Sweden

Post by storck »

Well, I suspected it wasn't possible. I'll just have to code it myself. Not a problem. I'll put something together that is more like what I am used to.

I can understand that my talk about align client isn't clear to people not using Borland. It just makes your component expand to fill the entire window, panel or whatever. Nevermind. Not an issue.

While I am at it. Thank you once more for PureFORM. It is such a great tool. And it is getting better all the time. :P

Regards,

Storck
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

Bug found!

gnozal, if you create a window and register it with PureRESIZE_SetWindowMinimumSize, thene there is a bug, when you click+hold the mouse button in the ^upper >left corner!

Hold the mouse button and move the mouse to north-west, window will be resized correcty (gadgets, too)!

Move mouse back to the coordinates, where you began to resize the window.

Now, move the mosue to south-east. Window will be moved, although you are in resize-mode (mosue courser becomes a double-arrow).


I'll send you a zipped video link (1 MB) via PM! Have a look at it, please!


Something else: Why don't you support #PB_ignore at PureRESIZE_SetWindowMinimumSize ?? If user sets #PB_Ignore for MinimumHeight/Width, it should automatically use WindowWIdth/height(WIndowNumber.l) !!! Why do you think of this idea?
An other bug: I've got a windiw 600x450 pixel. Now I use PureRESIZE_SetWindowMinimumSize with 600x450 pixel. Then I resize the window to make it bigger. Now I want to make it smaller again: It is possible to make it some pixelx smaller than the window was created by default!


Something else: It would be nice to have an extra page in your Help-Files. In this extra page there should be the release-date and version of the lib. So you must not browse to the forum, just to have a look from what date your lib is...
PB 4.30

Code: Select all

onErrorGoto(?Fred)
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

AND51 wrote:gnozal, if you create a window and register it with PureRESIZE_SetWindowMinimumSize, thene there is a bug, when you click+hold the mouse button in the ^upper >left corner!
Hold the mouse button and move the mouse to north-west, window will be resized correcty (gadgets, too)!
Move mouse back to the coordinates, where you began to resize the window.
Now, move the mosue to south-east. Window will be moved, although you are in resize-mode (mosue courser becomes a double-arrow).
I'll send you a zipped video link (1 MB) via PM! Have a look at it, please!
I looked at it ... I will see what I can do ...
AND51 wrote:Why don't you support #PB_ignore at PureRESIZE_SetWindowMinimumSize ?? If user sets #PB_Ignore for MinimumHeight/Width, it should automatically use WindowWIdth/height(WIndowNumber.l) !!! Why do you think of this idea?
Because the lib was originaly developed for PB3.9x. But it's a good idea.
AND51 wrote:An other bug: I've got a windiw 600x450 pixel. Now I use PureRESIZE_SetWindowMinimumSize with 600x450 pixel. Then I resize the window to make it bigger. Now I want to make it smaller again: It is possible to make it some pixelx smaller than the window was created by default!
I will fix this
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Update (Both lib versions)

Changes :
- PureRESIZE_SetWindowMinimumSize() and PureRESIZE_SetWindowMaximumSize() now accept #PB_Ignore [PB4.0x version] or -1 [PB3.94 version]
- Fixed PureRESIZE_SetWindowMinimumSize() and PureRESIZE_SetWindowMaximumSize() : the sizes are now the real window sizes and not only the client area. You may have to modify your sources.
- Fixed manual resize problem (see AND51's post) : not perfect but it's all I can do for the moment.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
dontmailme
Enthusiast
Enthusiast
Posts: 537
Joined: Wed Oct 29, 2003 10:35 am

Post by dontmailme »

Thanks Gnozal...... you're libraries are the best there is :D
Paid up PB User !
AND51
Addict
Addict
Posts: 1040
Joined: Sun Oct 15, 2006 8:56 pm
Location: Germany
Contact:

Post by AND51 »

> Fixed manual resize problem (see AND51's post) : not perfect but it's all I can do for the moment.
I'll test it ASAP.

Another idea: Write down in your manual, that users should consider using SmartWindowRefresh(). In my project it helps, when resizing with your PureRESIZE. So just give your users this useful tip, I almost forgot that this command exists. Would be nice to have this hint in your documentation!
PB 4.30

Code: Select all

onErrorGoto(?Fred)
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

AND51 wrote:Another idea: Write down in your manual, that users should consider using SmartWindowRefresh(). In my project it helps, when resizing with your PureRESIZE.
I never tested it, as it is a PB4 only feature (and the lib went out long before). And I don't know how it works or how it could interfere with the library.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Post Reply