Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make regular popup look like shortcut popup?
Message
 
To
25/10/2001 08:17:48
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00572628
Message ID:
00573117
Views:
30
Once again, thanks very much Cetin. This helps very much.

>>Thanks again Cetin. That function is perfect.
>>
>>To me the popup looks 'BLAH'. With it's 'flat' appearance it looks cut into rather than on top of the form. Any thoughts on how to make the popup look better? To bad the SHADOW clause doesn't exist for DEFINE POPUP anymore.
>>
>
>Colin,
>Actually I'd create a listbox and assign popup to it. I directly answered your original question. This one is nort perfect but better I think (keep in mind this creates a container and should find place at least for its size - right click somewhere at bottom right to see what I mean) :
>
>
oForm=createobject('myForm')
>oForm.Show
>Read events
>
>
>Define class myForm as Form
>  Add Object myMenu as myMenu with name = 'myMenu'
>  procedure load
>  Define popup mypop multiselect
>  Define bar 1 of mypop prompt 'Color1' color RGB(0,0,0,192,192,192), RGB(0,0,0,0,255,255)
>  Define bar 2 of mypop prompt 'Color2' color RGB(0,0,0,192,192,192), RGB(0,0,0,255,0,255)
>  Define bar 3 of mypop prompt 'Color3' color RGB(0,0,0,192,192,192), RGB(0,0,0,255,255,0)
>  Define bar 4 of mypop prompt 'Color4' color RGB(0,0,0,192,192,192), RGB(0,0,0,0,255,0)
>  Define bar 5 of mypop prompt 'Done'   color RGB(0,0,0,192,192,192), RGB(0,0,0,192,192,192)
>  Endproc
>  Procedure queryunload
>    Clear events
>  Endproc
>  Procedure rightclick
>    With this.myMenu
>      .Move(min(mcol(wontop(),3), this.width-.width), ;
>      	min(mrow(wontop(),3),this.height-.height))
>      .visible = .t.
>    Endwith
>  Endproc
>Enddefine
>
>Define class myMenu as container
>  SpecialEffect = 0
>  BorderWidth = 1
>  Visible = .f.
>  Add object ColorCoded as myColorSel with left = 2, top=1
>  Add object myComm as myComm with left = 2
>  Procedure init
>    With this
>      .myComm.Top = .ColorCoded.height
>      .Height = .myComm.Top+.myComm.height+1
>      .width = .ColorCoded.width+4
>    Endwith
>  Endproc
>Enddefine
>
>Define class myColorSel as Listbox
>  SpecialEffect=1
>  BorderColor=rgb(192,192,192)
>  Procedure init
>With this
>  .RowSourceType = 9
>  .Rowsource = 'mypop'
>  .Height = .ListCount * FontMetric(1)+sysmetric(4)*2-1
>Endwith
>Endproc
>Enddefine
>Define class myComm as commandbutton
>  Caption='\<Done'
>  Procedure click
>    This.parent.visible = .f.
>  Endproc
>Enddefine
>
Cetin
Colin Magee
Team Leader, Systems Development
Metroland Media Group Ltd.
Mississauga, Ontario, Canada

cmagee@metroland.com

Never mistake having a career with having a life.
Previous
Reply
Map
View

Click here to load this message in the networking platform