Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Control opening of remote views in a form's DataEnvironm
Message
From
27/09/2023 17:20:10
 
 
To
21/09/2023 01:40:41
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01687065
Message ID:
01687087
Views:
107
>>On the other hand, what would be the best approach in order to replace the use of forms' DEs with remote views, but giving me the ease of building the form by dragging the fields at design time?
>
>What Tamar said. OTOH, I preferred a simpler way - having a builder. Something like this:
>
>
* curform.prg
>ASELOBJ(aa,1)
>RETURN aa[1]
>
>so, while editing, I'd do this in the command window:
>ox=curform()
>and then the ox would be a reference to the form being edited. Then I'd use intellisense to reference the fields, like this
>
>ox.container1.txtBlaBla.controlSource=alias.
>and it would drop down the list of fields to pick. I'd have to add quotation marks around the alias.field, but that's all. The downside of dragging fields is that you always get the same class of control, so for any combo, listbox and few other controls you still had to do it manually anyway.
>I even often did that part manually too - I'd add the controls from the command window:
>
>ox.pgf.page3.addobject("cboTr", "myCboClass")
>oCbo=ox.pgf.page3.cboTr
>oCbo.controlsource=alias. ...
>oCbo=...
>and I'd keep adding stuff to the oCbo on-the-fly, and intellisense was at hand. Even the size and position was easy to do this way, retyping a few digits from another control with which this one was to be aligned was no problem. I actually found this, after some practice, easier to do than ctrl-clicking or navigating through containership hierarchy in the PEM window to get to the place where I want to add the control. Getting the hierarchy right is easier with keyboard and intellisense than through visual editing means, IMO. Or I'm just the old keyboard type and clumsy with the mouse :).

Interesting way of doing it. Like a "manual" builder, I guess I'd give it a try.

By the way, when I drag fields onto a form and want to use a different class of control I drag the field using the right-button and when I drop the field, it shows me a small popup menu with 3 options (attached figure 1):

- "Create textbox here"
- "Create other control here..."
- "Cancel"

If I select the second one VFP shows me an "Open Visual Class Library" dialog (attached figure 2) and lets me select the class I want to create for the field.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform