Re: [BLACKBOX] Edit Field Scrolling Problem

From: [at]} <Josef>
Date: Fri, 25 Jan 2008 12:54:01 +0100

----boundary-LibPST-iamunique-1095821882_-_-
Content-type: text/plain

> This bit of code in PROCEDURE (f: Field) Restore in HostCFrames
> seems to be where the behavior is controlled:
>
> IF f.right & ~f.left THEN style := style + {1, 2} (* right align, multiline *)
> ELSIF ~f.left THEN style := style + {0, 2} (* center, multiline *)
> END;
>
> Hence, it seems that if you specify that a field is right aligned then it
> will also be defined as multiline, so excess characters would go onto a new
> line (even if there is no room for one?).

THANX!! Removing '2' from the style solves the problem.
OMS please correct this in BB1.6. It gives no sense and must be
an oversight to include '2'.

> ES_RIGHT* = {1};

While correcting the setting of style, it may also be a good idea to use named
WinApi constants as Doug proposed.
This would eliminate the need for the comments.
Here is my local fix: of
PROCEDURE (f: Field) Restore in module HostCFrames
...
  IF f.right & ~f.left THEN style := style + WinApi.ES_RIGHT
  ELSIF ~f.left THEN style := style + WinApi.ES_CENTER
  END;

> Another consequence of this design is that if f.right and f.left are both
> true then you will get left aligned. There is no obvious right answer but my
> instinctive guess would have been 'right+left aligned' means 'centred'.
>
> There should really be only three possible choices (left, center or right as
> you might implement e.g. with a radio group or combo box) than the four that
> you get with a pair of checkboxes.

I guess, both left and right is intended to mean 'block adjusted',
but this is not supported in Windows EDIT controls.
Regarding radio group etc.: I think it is a design problem of the BB controls to
use a common properties dialog for all of them, whereby all of the controls have
their own properties and only a couple of them are applicable to all controls.
A tabular 'Property Page' style dialog would be much better.

- JT


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy----boundary-LibPST-iamunique-1095821882_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciB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MQUNLQk9YIiB0byBMSVNUU0VSVkBMSVNUUy5P
QkVST04uQ0hccGFyDQp9
----boundary-LibPST-iamunique-1095821882_-_---
Received on Fri Jan 25 2008 - 12:54:01 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:31:07 UTC