Inner size of a Gadget
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by alizta.
at least for things like panels... try to write dynamical resizeing without... impossible... you might try to calculate yourself, but that is *very* difficult. the user could have changed windows settings, so that Panel Headers are bigger or smaller, or he yould use WinXP/Luna Mode...
---when all you have is a hammer, everything starts to look like a nail... ---
at least for things like panels... try to write dynamical resizeing without... impossible... you might try to calculate yourself, but that is *very* difficult. the user could have changed windows settings, so that Panel Headers are bigger or smaller, or he yould use WinXP/Luna Mode...
---when all you have is a hammer, everything starts to look like a nail... ---
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by tinman.
but you have to make some assumptions, especially under Windows. In my experience a lot of the sizes seem to be fixed, although I don't have XP or any other skinning tools.
There is no way to get Windows controls to tell you their sizes before you create them, but they are usually flexible enough to resize after you create them.
I don't know about Linux in this respect.
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + all updates, PB3.50)
Calculating sizes yourself is easy (well, sort ofOriginally posted by alizta
at least for things like panels... try to write dynamical resizeing without... impossible... you might try to calculate yourself, but that is *very* difficult. the user could have changed windows settings, so that Panel Headers are bigger or smaller, or he yould use WinXP/Luna Mode...

There is no way to get Windows controls to tell you their sizes before you create them, but they are usually flexible enough to resize after you create them.
I don't know about Linux in this respect.
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + all updates, PB3.50)
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by PB.
> try to write dynamical resizeing without... impossible...
Not impossible at all:
viewtopic.php?t=3700
> try to write dynamical resizeing without... impossible...
Not impossible at all:
viewtopic.php?t=3700
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by alizta.
ratios will not work for me. still i got the resizing to work properly and to my surprise, it did not make any difference if it was run in luna. still i calculate positions now like ThisGadgetHeight - EstimatedStatusbarHeight and so on... if even one of this settings is changed, it will cease to work.
For work i used to code in PowerBuilder and it had the feature of retrieving the space you realy have to work with. A feature like that would make things easier, since now i have to find a way of getting *every* system setting which might have an effect on Panelheaders, Statusbars etc wich wil be a lot of work (if it is even possible to get these information).
---when all you have is a hammer, everything starts to look like a nail... ---
ratios will not work for me. still i got the resizing to work properly and to my surprise, it did not make any difference if it was run in luna. still i calculate positions now like ThisGadgetHeight - EstimatedStatusbarHeight and so on... if even one of this settings is changed, it will cease to work.
For work i used to code in PowerBuilder and it had the feature of retrieving the space you realy have to work with. A feature like that would make things easier, since now i have to find a way of getting *every* system setting which might have an effect on Panelheaders, Statusbars etc wich wil be a lot of work (if it is even possible to get these information).
---when all you have is a hammer, everything starts to look like a nail... ---
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by tinman.
At the moment it cannot handle status bars - I was looking at those the other day and from my API docs it seems there is no way to find out how big a status bar (or any other Windows gadget) will be drawn until you actually create it, and then you can measure it's size.
Anyway, if you would like to check it, the file is ->http://www.david-mcminn.co.uk/files/layout_demo.zip<-
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + all updates, PB3.51)
Would you be able to download and test a small program I wrote with Luna on WinXP? It uses my GUI layout code and I would like to hear how well/badly it performs under those conditions where you say inner gadget sizes are different from older versions of Windows.Originally posted by alizta
the skinned gui of winXP is called luna.
At the moment it cannot handle status bars - I was looking at those the other day and from my API docs it seems there is no way to find out how big a status bar (or any other Windows gadget) will be drawn until you actually create it, and then you can measure it's size.
Anyway, if you would like to check it, the file is ->http://www.david-mcminn.co.uk/files/layout_demo.zip<-
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + all updates, PB3.51)
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by alizta.
i'm coding under xp as well. just switch to 'classic mode'. there are people out there who claim that xp's classic mode is just a skin for luna, but this is not true. it will behave in 'classic mode' like it will behave on NT/2k or 9x.
my problem is: you can change fontsizes which enlargens Panelheaders, you can change the size of scrollbars, etc all of which can affect the innersize of something as a panelgadget.
---when all you have is a hammer, everything starts to look like a nail... ---
i'm coding under xp as well. just switch to 'classic mode'. there are people out there who claim that xp's classic mode is just a skin for luna, but this is not true. it will behave in 'classic mode' like it will behave on NT/2k or 9x.
my problem is: you can change fontsizes which enlargens Panelheaders, you can change the size of scrollbars, etc all of which can affect the innersize of something as a panelgadget.
---when all you have is a hammer, everything starts to look like a nail... ---
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by alizta.
just tried your program anyway. resizes well on my system.
i tried my program and experimented a little.
if you have an exact layout of widgets boarding directly to each other there is following problem: if your program has a menu and the fontsize of the menu is changed, your resizing code will not work properly.
---when all you have is a hammer, everything starts to look like a nail... ---
just tried your program anyway. resizes well on my system.
i tried my program and experimented a little.
if you have an exact layout of widgets boarding directly to each other there is following problem: if your program has a menu and the fontsize of the menu is changed, your resizing code will not work properly.
---when all you have is a hammer, everything starts to look like a nail... ---
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm
Restored from previous forum. Originally posted by tinman.
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + all updates, PB3.51)
The MenuHeight() command should tell you how big a menu bar will be (and you can call it before you open a window). I think there is also a Windows message that gets sent to applications when the font size changes, so you may be able to detect that and change the size and positions of your gadgets accordingly.Originally posted by alizta
other there is following problem: if your program has a menu and the fontsize of the menu is changed, your resizing code will not work properly.
--
It's not minimalist - I'm increasing efficiency by reducing input effort.
(Win98first ed. + all updates, PB3.51)
-
- PureBasic Guru
- Posts: 16777133
- Joined: Tue Apr 22, 2003 7:42 pm