|
klerindias Novice
Joined: 23 Jan 2010 Posts: 37
|
Posted: Mon Apr 30, 2012 11:54 pm
Is it possible? |
Is it possible to change #window size depends on numbers of lines.
Example:
line1
line2
line3
line4
line5
and i got again and it repeating with updating values
line1
line2
line3
line4
line5
and it change non stop but i somehow want to count this number
in this example 5 lines (i can do it)
and then resize my window to number of lines i count ( no clue how to do it) |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Tue May 01, 2012 12:48 am |
There are %pref options for WindowHeight and WindowWidth, but they don't see to do anything... bug?
Besides that, there's no good way to do it, unless you want to close the window and remake it every time... |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue May 01, 2012 1:18 am |
No, not a bug. An unfinished/forgotten feature that suffers from a multitude of various issues--lack of updates when the governed features were redone, said prefs never doing anything in the first place (zmud port, basically), etc.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Tue May 01, 2012 2:01 am |
MattLofton wrote: |
lack of updates |
I lol'd. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4692 Location: Pensacola, FL, USA
|
Posted: Tue May 01, 2012 2:42 am |
using the #makewindow command you should be able to set the window height (in pixels) so some trial and error would be needed.
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Dumas Enchanter
Joined: 11 Feb 2003 Posts: 511 Location: USA
|
Posted: Thu May 03, 2012 12:45 am |
shalimar wrote: |
using the #makewindow command you should be able to set the window height (in pixels) so some trial and error would be needed. |
How about when you are opening an already created window? Does MAKEWINDOW allow this? |
|
|
|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Thu May 03, 2012 1:18 am |
Using the #MAKEWINDOW command or #MXP <FRAME>...</FRAME> will do what you want. If the window doesn't exist it will create it, if it does exist it will modify it according to tha parameter list passed to it. As to how to figure out how to adjust a window based on its contents, I have found that, for me, it is not an exact science. However, by using character values (##C) I can build an agreeable window. The length of the text you want to write (obtained via the %len function) adjusted for the current fontsize should work for you. A monospace font is recommended in this case.
|
|
_________________ Sic itur ad astra. |
|
|
|
|
|