|
Post by Walt Decker on Jan 26, 2021 12:13:06 GMT -5
It appears that MAPHANDLE can not be used with multiple instances of a control. Other than creating multiple instances of a window and setting their parent, is there a native method for doing this?
Example:
Sx = 2 Sy = 2 Szx = 10 Szy = 10 Offs = 4 FOR I = 0 TO 2 GRAPHICBOX #WIN.GFX, Sx, Sy, Szx, Szy NewName$ = "#GFX." + TRIM$(STR$(I)) MAPHANDLE #WIN.GFX, NewName$ Sx = Sx + Szx + Offs NEXT I
|
|
|
Post by Rod on Jan 26, 2021 13:18:57 GMT -5
Longstanding limitation, been discussed a few times. Folks would love to create multiple controls programmatically but MapHandle can only change a Window's handle. Work round is to write the creation code programmatically.
Another work round is to have a "flying" control which is repositioned on a graphicbox to give the impression of multiple controls. A grid of textboxes for example.
All a bit of a kludge. Will be different in LB5.
|
|
|
Post by Walt Decker on Jan 26, 2021 13:31:14 GMT -5
Ok. I'll work around it.
|
|
|
Post by Rod on Jan 26, 2021 14:33:33 GMT -5
You will be our hero if you can get multiple control creation working :)
|
|