1. Resize a Listview

Hi people;

         Anyone could show to me (or indicated where I can found) how a 
Listview can be automatic resized when I resize a window ?


Thanks

Rubens



At 14:48 5/7/2003, you wrote:
>
>
>On Sat, Jul 05, 2003 at 11:12:25AM -0400, Lucius Hilley wrote:
> >
> >
> > Nice set of features.  But I don't run a lot of X, (Linux GUI)
> >
> >         Lucius L. Hilley III
> >
>
>You don't need a Linux GUI, just the X Server (there is a link to download
>the free Windows X server on the site btw) and LessTif libraries (also has a
>link).
>
>Of course, only an experienced nix user who is also an experienced windows
>user could really understand that. So yes, NEdit is probably best for the
>Linux/FreeBSD programmers. Nothing wrong with that, tho.
>
>jbrown
>
> > ----- Original Message -----
> > From: "Jeffrey Nycz" <drode001 at entermail.net>
> > To: "EUforum" <EUforum at topica.com>
> > Sent: Saturday, July 05, 2003 10:33 AM
> > Subject: Good Text Editor for Euphoria
> >
> >
> > > If anyone is still looking for a good text editor to try out I've had
> > > great success with the Nirvana Text Editor or NEdit.  It has a default
> > > Euphoria syntax hilighting rules which you can change to meet your
> > > needs.  Syntax hilighting is fairly easy in NEdit if you know your
> > > regular expression rules. If anyone wants to use the rules I wrote just
> > > let me know and I can email 'em or post 'em here.
> > >
> > > A program called Expander can be used with NEdit to allow expansion of
> > > language specific keywords.  As one example for the Euphoria language I
> > > have defined an expansion for the if keyword.  So when I type:
> > > "if<F6>". it will expand to:
> > >   if ( |><| ) then
> > >      |><|
> > >   end if
> > > (The |><| are fields that you jump to.)  I could go on about its
> > > features but you might do better by going to www.nedit.org and reading
> > > all about both programs there.
> > >
> > > They have versions for almost every OS that you can think of so you
> > > won't have to go away empty handed.
> > >
> > > Well that's my two cents...
> > >
> > > JN
> > >
> > >
> > > TOPICA - Start your own email discussion group. FREE!
> > >
> > >
> > TOPICA - Start your own email discussion group. FREE!
> >
> >
>--
>  /"\  ASCII ribbon              | http://www.geocities.com/jbrown1050/
>  \ /  campain against           | Linux User:190064
>   X   HTML in e-mail and        | Linux Machine:84163
>  /*\  news, and unneeded MIME   | http://verify.stanford.edu/evote.html
>
>
>
>TOPICA - Start your own email discussion group. FREE!

new topic     » topic index » view message » categorize

2. Re: Resize a Listview

Ok, now in English  :>)))))

Hi people;

         Could anyone show me (or indicate where I could find) how a 
Listview can be automatically resized when I resize a window ?
         Using setRect, the listview's scrollbars disappear. (win2000)

Thanks

Rubens






>At 14:48 5/7/2003, you wrote:
>>
>>
>>On Sat, Jul 05, 2003 at 11:12:25AM -0400, Lucius Hilley wrote:
>> >
>> >
>> > Nice set of features.  But I don't run a lot of X, (Linux GUI)
>> >
>> >         Lucius L. Hilley III
>> >
>>
>>You don't need a Linux GUI, just the X Server (there is a link to download
>>the free Windows X server on the site btw) and LessTif libraries (also has a
>>link).
>>
>>Of course, only an experienced nix user who is also an experienced windows
>>user could really understand that. So yes, NEdit is probably best for the
>>Linux/FreeBSD programmers. Nothing wrong with that, tho.
>>
>>jbrown
>>
>> > ----- Original Message -----
>> > From: "Jeffrey Nycz" <drode001 at entermail.net>
>> > To: "EUforum" <EUforum at topica.com>
>> > Sent: Saturday, July 05, 2003 10:33 AM
>> > Subject: Good Text Editor for Euphoria
>> >
>> >
>> > > If anyone is still looking for a good text editor to try out I've had
>> > > great success with the Nirvana Text Editor or NEdit.  It has a default
>> > > Euphoria syntax hilighting rules which you can change to meet your
>> > > needs.  Syntax hilighting is fairly easy in NEdit if you know your
>> > > regular expression rules. If anyone wants to use the rules I wrote just
>> > > let me know and I can email 'em or post 'em here.
>> > >
>> > > A program called Expander can be used with NEdit to allow expansion of
>> > > language specific keywords.  As one example for the Euphoria language I
>> > > have defined an expansion for the if keyword.  So when I type:
>> > > "if<F6>". it will expand to:
>> > >   if ( |><| ) then
>> > >      |><|
>> > >   end if
>> > > (The |><| are fields that you jump to.)  I could go on about its
>> > > features but you might do better by going to www.nedit.org and reading
>> > > all about both programs there.
>> > >
>> > > They have versions for almost every OS that you can think of so you
>> > > won't have to go away empty handed.
>> > >
>> > > Well that's my two cents...
>> > >
>> > > JN
>> > >
>> > >
>> > > TOPICA - Start your own email discussion group. FREE!
>> > >
>> > >
>> > TOPICA - Start your own email discussion group. FREE!
>> >
>> >
>>--
>>  /"\  ASCII ribbon              | http://www.geocities.com/jbrown1050/
>>  \ /  campain against           | Linux User:190064
>>   X   HTML in e-mail and        | Linux Machine:84163
>>  /*\  news, and unneeded MIME   | http://verify.stanford.edu/evote.html
>>
>>
>>TOPICA - Start your own email discussion group. FREE!
>
>
>
>TOPICA - Start your own email discussion group. FREE!
>
>

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

3. Re: Resize a Listview

On Sat, 05 Jul 2003 16:04:05 -0300, rml at rubis.trix.net wrote:

>
>
>Ok, now in English  :>)))))
>
>Hi people;
>
>         Could anyone show me (or indicate where I could find) how a=20
>Listview can be automatically resized when I resize a window ?
>         Using setRect, the listview's scrollbars disappear. (win2000)
>
>Thanks
>
>Rubens

I have a little browse.ew routine which works nicely with lists but
apparently not listviews (I just tried). Post me an example (fixed
size) window & i'll have a bash at it, if no-one else pips me to the
post

Pete
PS: I am a dumb schmuck that knows not the difference btwixt list und
der listviwer. Froedenshroezenhower!!

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

4. Re: Resize a Listview

----- Original Message -----
From: <rml at rubis.trix.net>
To: "EUforum" <EUforum at topica.com>
Subject: Resize a Listview


>
>
> Hi people;
>
>          Anyone could show to me (or indicated where I can found) how a
> Listview can be automatic resized when I resize a window ?
>

Assuming you are using win32lib.

The outside edge size of the listview is just a simple to resize as any
other control.

a) Create a handler for the w32HResize event for the containing Window.
b) In the handler code, get the new size of the window using
getClientSize(win).
c) Calculate the new size of the listview edges, based on whatever basis you
like.
d) call setRect(listview, ...) using the new calculated sizes and position
data.

The hard bit is working out how to change the width of the columns (assuming
a Report View listview). In one of my apps, I try to keep the relative
proportions the same, down to a minimum column size.
 a) When you create the listview for the first time, record the size of it.
Then in the resize event handler...
 b) Get the current widths of each column.
     sequence colwid colwid = {}
     for ColNum = 1 to ColumnCount do
         colwid &= sendMessage(lv, LVM_GETCOLUMNWIDTH, ColNum-1, 0)
     end for
 c) Get the old size of the listview before the resize
 d) Calc new listview size as in above method.
 e) For each column, calc the new width as ( (NewSize/OldSize) * oldWidth)
    colwid *= (NewSize/OldSize)
 f) set The new column widths
     for ColNum = 1 to ColumnCount do
         VOID = sendMessage(lv, LVM_SETCOLUMNWIDTH, ColNum-1, colwid[ColNum]
* #FFFF)
     end for
 g) Save the listview size (OldSize) for the next resize event.

By the way, you can use these special values to set the widths...
    LVSCW_AUTOSIZE -- Auto size to the column's current contents
    LVSCW_AUTOSIZE_USEHEADER -- Auto size to the current heading text.

--
Derek

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

Search



Quick Links

User menu

Not signed in.

Misc Menu