Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Scroll Bars Disappear.
Message
 
À
23/04/1999 14:50:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00211658
Message ID:
00212051
Vues:
27
Interesting user requirement :-) And yes, they ARE always right, even when wrong. I have no idea why 61 is the magic number, but I DO have a possible work around.

Can you put the buttons into a container? Perhaps have a container object with 10 buttons. Then you add copies of the container object and set properties of the buttons If you don't need all 10 just make them visible=.F.

HTH
Barbara



>I have a Form with an unknown amount of Comand Buttons. Usually around 30. Some times as many as 100. I know its not the best way to do this but its what my user wants...and they are always right.
>Anyway .. if I have 61 Buttons the Scroll bar appears. If I have 62 it mystically disapperrs: If lnNumButtons = 61 it works. If it is 62 it does not work. Here is the Code:
>
>
>***Start of Code
>lnNumButtons = 61
>oForm = CREATEOBJECT('LotaButtons')
>lnPosTop = 5
>lnPosLeft = 16
>FOR x = 1 TO lnNumButtons
> lcCmdname = "CMD" + ALLTRIM(STR(x))
> oForm.ADDOBJECT(lcCmdname,'cmdbtn')
> oForm.&lcCmdname .HEIGHT = 24
> oForm.&lcCmdname .WIDTH = 72
> oForm.&lcCmdname .TOP = lnPosTop
> oForm.&lcCmdname .LEFT = lnPosLeft
> oForm.&lcCmdname .CAPTION = lcCmdname
> oForm.&lcCmdname .visible = .t.
> lnPosTop = lnPosTop + 25
> IF x < 20
> oform.height = lnPosTop + 30
> ENDIF
>ENDFOR
>oForm.SHOW
>READ EVENTS
>
>DEFINE CLASS LotaButtons AS FORM
> scrollbars = 3
> halfheightcaption = .t.
> height = 70
> width = 112
> BorderStyle = 2
> backcolor = 16711680
>ENDDEFINE
>
>DEFINE CLASS cmdbtn as COMMANDBUTTON
>
>ENDDEFINE
>*** End
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform