----boundary-LibPST-iamunique-1106757930_-_-
Content-type: text/plain
On Wed, 24 May 2006, CFB Software wrote:
> Unfortunately BB only handles a very small subset of possible events in that
> way. If you want to do anything but the most basic operation (i.e. respond
> to a click) then you are on your own in BB and have to do it the real hard
> way requiring many lines of code.
After reading this paragraph I revisited the GrViews and read the
procedures which handle user interactions. Please have a look.
It starts with the comment (* Message handling *). It all looks pretty
bloody. I am shaking my head that I developed such a thing. I still have
an archive somewhere with all the e-mails from Dominik Gruntz, Wolfgang
Weck, and Cuno Pfister, who all helped me enormously. What is the lesson?
Not sure. I was much less experienced back then. The timestamp in the
code says 2001.
Developing interactive Views is the top-level activity in BB. Most of the
time one does not need to go through this. I did it only once with
GrViews to the full extent. I am developing quite a few interactive apps,
but I never had to revisit this topic again. What is the lesson?
That usually one does not have to handle the mouse or program tracking
loops?
> The example I gave the other day is
> typical: I have a table on a form, when I resize the form, I want the table
> to continue to fill the form so that I can see as much of it as possible,
> rather than remaining as a fixed size in the top left hand corner of the
> window. In Delphi, VB, C# etc. this is achieved with just *one* assignment
> statement. How can you do this in BB?
When I resize my GrView then the content is resized as well.
For inspiration maybe have a look at GrViews
PROCEDURE (v: View) HandlePropMsg- (VAR msg: Properties.Message);
However, the content of the GrView is not a view. There is no message
passing down from the GrView to its descendant views, because there
are no descendants. There is a comment there in the procedure
"For embedded views, these four flags have no effect". The comment
is talking of msg.horFitToWin etc.
Following this trail of crumbs, I am digging into docu
Views->HandlePropMsg. Which says:
HandlePropMsg must be implemented in views which support
preferences and properties (-> Properties). It is called by the
surrounding container to find out about the way that the embedded view
would like to be treated.
Sounds promising. The arrow "->" would indicate that Properties is
hyperlinked from Views, but of course it is not hyperlinked.
OK, let me open Properties docu and search for horFitToWin. Somewhere
in the vicinity I found this:
TYPE ResizePref (Preference)
The receiver of this message can indicate that it doesn't wish to be
resized, by setting fixed to TRUE. A fixed size view doesn't show resize
handled when it is selected as a singleton.
For the root view in a document or window the fields horFitToPage,
verFitToPage, horFitToWin, and verFitToWin can be used to enforce
automatic adaptation of the view size to the actual window or page size.
For embedded views, these four flags have no effect, in contrast to
fixed.
All right, these 4 flags only have effect for a view in the regular
BB window, which is usually the case with GrViews.
The flags have no effect for embedded views... Makes some sense.
I actually often drop a GrView on a form, and I do not want it
to fill the entire form because there are also buttons there.
So this is OK.
But you are saying you want the table to fill the entire form?
This is interesting. If the entire form is filled, then what
is it needed for?
Perhaps you can set msg.fixed := FALSE and see what happens?
If you dig in the docu of Properties somewhere in the vicinity of
these paragraphs then maybe you will find some more inspiration.
> Calling a function written in a different language (and different dll) is
> only fractionally more difficult than calling one in the same language when
> you are in the .NET environment.
This is a biggie. But it works between .NET languages, does it not. How
about legacy DLLs that were not developed under .NET?
w.
--- BlackBox
--- send subject HELP or UNSUBSCRIBE to blackbox{([at]})nowhere.xy
----boundary-LibPST-iamunique-1106757930_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIE9uIFdlZCwgMjQgTWF5IDIwMDYsIENGQiBTb2Z0
d2FyZSB3cm90ZTpccGFyDQpccGFyDQo+IFVuZm9ydHVuYXRlbHkgQkIgb25seSBoYW5kbGVzIGEg
dmVyeSBzbWFsbCBzdWJzZXQgb2YgcG9zc2libGUgZXZlbnRzIGluIHRoYXRccGFyDQo+IHdheS4g
SWYge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