Column-Width in a dynamic Browse?

Storzum

Member
Hi.
Im really new in Progress and have the following question:

I have make a dynamic browse and now wants to select which db-fields are visible in this browse:
mybrowse:ADD-LIKE-COLUMN("table.field1") NO-ERROR.
mybrowse:ADD-LIKE-COLUMN("table.field2") NO-ERROR.
But how can I size the width for these columns?

Thanks for every answer and excuse my bad english.

Greets
Storzum
 

bendaluz2

Member
This should do it:

Code:
mybrowse:GET-BROWSE-COLUMN( column-index ):WIDTH-CHARS = width-in-chars.

or

Code:
mybrowse:GET-BROWSE-COLUMN( column-index ):WIDTH-PIXELS = width-in-pixels.
 

Storzum

Member
Ok thank you.
Tomorrow I will test it.

BTW: Does it work in the same way when I want to set the label of these columns?
 

Storzum

Member
OK.
It works.
I can set the width-pixels - and the label - attributes.
(With "width-chars" I have get a error).

In the program the query behind the browse will run more then one time.
Where should I delete the Browse-, Buffer- and Query-Objects?
When the program exits?
And where can I find the attributes which I can set with the GET-BROWSE-COLUMN - statement in the progress-documentation?

Thanks a lot for your help.

Greets
Storzum
 

bendaluz2

Member
Yeah, i'd delete them when the program exits

Look in the progress help (Start | Programs | Progress | Help) <- Or under whatever structure you have installed it in

on the Index tab, use the search to find the item "BROWSE widget"

On this help page, there is a section called "Attributes" which lists all the available attributes, whether they are readable, writeable or both and what they apply to (ie Browse, Column or Cell)

HTH
 

Storzum

Member
OK.
I have found the Browse-Help before.
What I am missing are some examples.

Now it works.

Is there any Site in the web, which have some example-code on dynamic-query and -browse?

Thanks again.
 
Top