[Vwnc7.8]UI Painter on dataset widget (novice doubt)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Vwnc7.8]UI Painter on dataset widget (novice doubt)

Fabio Lodrini
Hello,
as a newbie (albeit seasoned !) I'm trying to mimic the behavior of
AdHocQueryTool in a simpler experimental application, copying/cloning
methods and redrawing a new canvas, but I'm stuck on the grid layout of
dataset widget.
No matter how I define row size in the "basic" tab of painter, the first
row of the grid created with "add column" button is always fixed to 15
pixels (or what unit uses the row size widget, more or less); loading DB
data, the text content (field name label) of this row is vertically
truncated and unreadable (e.g. bottom half of text under the second row).

The only way found to overcome this has been:
- select the column
- open "column" tab on painter
- set the label "string" to a fake text (a dot)
- set the font to system

Now the label is correctly visible, but with a font smaller than data
rows also than labels of AdHoc tool.

A quick test with a fresh image, without any add-on, has the same problem.

Is this a simple wrong approach by me, a known feature or a small bug ?

Thanks in advance, regards

Fabio, I2LQF
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [Vwnc7.8]UI Painter on dataset widget (novice doubt)

Holger Kleinsorgen
Fabio Lodrini wrote
No matter how I define row size in the "basic" tab of painter, the first
row of the grid created with "add column" button is always fixed to 15
pixels (or what unit uses the row size widget, more or less);
The height of the label row is determined by the maximum height of the labels, not the grid size. The view caches the height, so if you update the labels afterwards it might happen that they are truncated.

The AdHoc query tool uses the 'Default' text style, not 'System'. 'Default' is usually larger than 'System'.
So try to set the font to 'Default' and use a dummy string like "Mg".

Or implement an extension of DatatSetView:

  DataSetView>>setLabelHeightToGridSize

       topOffset := self lineGrid

and update the columns like this (assuming that you are using #columnDescriptors like the adhoc query tool):

     dataset setLabelHeightToGridSize.
     dataset columnDescriptors: columnCollection.
Reply | Threaded
Open this post in threaded view
|

Re: [Vwnc7.8]UI Painter on dataset widget (novice doubt..solved)

Fabio Lodrini
Thanks Holger !

problem solved, and a little more knowledge of VisualWorks innards gained !
Regards, Fabio

On 15/09/2012 17.37, Holger Kleinsorgen wrote:

> Fabio Lodrini wrote
>> No matter how I define row size in the "basic" tab of painter, the first
>> row of the grid created with "add column" button is always fixed to 15
>> pixels (or what unit uses the row size widget, more or less);
>>
> The height of the label row is determined by the maximum height of the
> labels, not the grid size. The view caches the height, so if you update the
> labels afterwards it might happen that they are truncated.
>
> The AdHoc query tool uses the 'Default' text style, not 'System'. 'Default'
> is usually larger than 'System'.
> So try to set the font to 'Default' and use a dummy string like "Mg".
>
> Or implement an extension of DatatSetView:
>
>    DataSetView>>setLabelHeightToGridSize
>
>         topOffset := self lineGrid
>
> and update the columns like this (assuming that you are using
> #columnDescriptors like the adhoc query tool):
>
>       dataset setLabelHeightToGridSize.
>       dataset columnDescriptors: columnCollection.
>
>
>
>
> --
> View this message in context: http://forum.world.st/Vwnc7-8-UI-Painter-on-dataset-widget-novice-doubt-tp4647573p4647577.html
> Sent from the VisualWorks mailing list archive at Nabble.com.
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc