1

Konu: Buttongroup does not show up, except a tiny bit of it

I create a form in code, put the FoxyClasses locatorgrid on it, and then I create a buttongroup in code to put below the grid. I have made the group and its buttons visible. Still, only about 1/8 of the top, left corner of the left-most button in the group is visible, and it is clickable. What might be happening?

I would put an image in here, but I can't for the life of me remember how to do it. :-(

Hans L

2

Re: Buttongroup does not show up, except a tiny bit of it

buttongroup => commandgroup. Sorry!

Hans L

3

Re: Buttongroup does not show up, except a tiny bit of it

Hans,
If you don't size the button's and the commandgroup itself (either in code or visually) then it uses a default size. That size might be much smaller than what you need. Here is some code that places 2 commandgroups with 10 buttons each. Only the second one is sized (here just used AutoSize for simplicity):

Visual Fox Pro
PUBLIC oForm

oForm = CREATEOBJECT('SampleForm')
oForm.Show
 
DEFINE CLASS SampleForm as Form
    ADD OBJECT btnGroup1 as CommandGroup WITH Left=10,ButtonCount=8
    ADD OBJECT btnGroup2 as CommandGroup WITH Left=200,ButtonCount=8,Autosize=.t.
enddefine

PS: I don't know how to send image here either (I am even not sure that you can). If you want to send image or video then check:

http://www.techsmith.com/jing/

You can store and share picture/video from there.

4

Re: Buttongroup does not show up, except a tiny bit of it

I have simplified the code (see below) and same result (see

http://screencast.com/t/MmYwMDI5YW  )

See the little bit of the first button in the commandgroup to the left quite far down the screen.

I "starred"  the code for the grid so that I could ascertain that it did not interfere.

*
*  twslistform.prg
*
*  Creation of form for list and detailed data
*
*
*
DO twsdatacreation  && In this prg file, a dursor is created

*

PUBLIC oListform

oListform = CREATEOBJECT('clListform')  && clListform is a class (see below) on which the form oListform is based. 

oListform.Show()

*

DEFINE CLASS clListform AS Form
    Height = 820
    Width = 1260

    PROCEDURE Init
        This.Set_Up_Listform()
    ENDPROC
    
    ADD OBJECT cmgCombobutt as Commandgroup WITH buttoncount = 2

    PROCEDURE Set_Up_Listform


*        CREATING MENU BUTTON(RETURN BUTTON)  

*        THISFORM.NEWOBJECT('cmgComboButtGr', 'clComboButtGr', 'twsClcombobuttgr.prg')

        WITH THISFORM.cmgComboButt
            .Top = .Parent.Top + .Parent.Height - 300
            .Left = .Parent.Left + 20
            .Visible = .T.
            .SetAll("Visible",.T.)
        ENDWITH
            
    ENDPROC

ENDDEFINE


What do I not see that makes the buttongroup not show correctly?

Regards,

Hans L

5

Re: Buttongroup does not show up, except a tiny bit of it

Okay, it works. It was, of course, the sizing. Thanks!!!

Hans L