Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to center check boxes in grid
Message
From
19/08/1999 07:33:27
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
19/08/1999 05:53:31
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00255170
Message ID:
00255191
Views:
21
>I have several check boxes in a grid. They work fine, however I would like to change two things. Make the check box larger and to center them in the column.
>
>I saw a tip on it at one time, but I can't remember where I saw it.
>
>Any help would be appreciated.
>
>Gaylen Jungling
Gaylen,
Use a container. In that container you could freely set checkbox placement. ie:
* Assuming you named container myContainer and checkbox in it myChkBox
* Container.init
with This.myChkBox
  .left = int((this.parent.width - .width) / 2) && Center hor.
  .top = int((this.parent.parent.rowheight - .height)/2) && center vert.
  .controlsource = this.parent.controlsource  && Setcontrolsource
endwith	
*Gotfocus of container
this.myChkBox.setfocus() 
* Would provide as if it was directly there w/o a container

* Belonging columns resize event
with This.myContainer.myChkBox
  .left = int((this.width - .width) / 2) && Center hor.
  .top = int((this.parent.rowheight - .height)/2) && center vert.
endwith	
PS: Set container backstyle and checkbox backstyle to transparent. So your column colorings (ie:DynamicBackColor) would work as intended.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform