 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Boyan Guest
|
Posted: Sat Sep 06, 2003 12:11 am Post subject: Placing button inside Edit |
|
|
Hi
I want to make some kind of spin edit, and I have one TEdit (main control)
and TSpinButtons (TCustomControl). How
to place this buttons in Edit (on right side) and then to move right margin
of Edit to disable typing on space where are buttons.
Thanks and Regards
Boyan
|
|
| Back to top |
|
 |
Boyan Guest
|
Posted: Sat Sep 06, 2003 12:15 am Post subject: Re: Placing button inside Edit |
|
|
Hi Again,
For some reason next code (from Spin.pas) do large flickering?!
var
Loc: TRect;
begin
SendMessage(Handle, EM_GETRECT, 0, LongInt(@Loc));
Loc.Bottom := ClientHeight + 1; {+1 is workaround for windows paint bug}
Loc.Right := ClientWidth - FButton.Width - 2;
Loc.Top := 0;
Loc.Left := 0;
SendMessage(Handle, EM_SETRECTNP, 0, LongInt(@Loc));
SendMessage(Handle, EM_GETRECT, 0, LongInt(@Loc)); {debug}
end;
Is there any workaround for this, to disable flickering? If text are changed
a little bit faster you will see a large flickering.
Thanks
Boyan
"Boyan" <nikolicspamoffbojan (AT) hotmail (DOT) com> wrote
| Quote: | Hi
I want to make some kind of spin edit, and I have one TEdit (main control)
and TSpinButtons (TCustomControl). How
to place this buttons in Edit (on right side) and then to move right
margin
of Edit to disable typing on space where are buttons.
Thanks and Regards
Boyan
|
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Sat Sep 06, 2003 12:20 am Post subject: Re: Placing button inside Edit |
|
|
"Boyan" <nikolicspamoffbojan (AT) hotmail (DOT) com> wrote
| Quote: | I want to make some kind of spin edit, and I have one
TEdit (main control) and TSpinButtons (TCustomControl).
|
Why not use a TUpDown instead? It works well with edit controls.
Gambit
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03
|
|
| Back to top |
|
 |
Boyan Guest
|
Posted: Sat Sep 06, 2003 12:34 am Post subject: Re: Placing button inside Edit |
|
|
Hi
Yes, I know about TUpDown,
But I want to create my own spinedit (and to learn this) and to have buttons
inside Edit and then in future to add something more.
Boyan.
"Remy Lebeau (TeamB)" <gambit47 (AT) yahoo (DOT) com> wrote
| Quote: |
"Boyan" <nikolicspamoffbojan (AT) hotmail (DOT) com> wrote in message
news:3f59264c (AT) newsgroups (DOT) borland.com...
I want to make some kind of spin edit, and I have one
TEdit (main control) and TSpinButtons (TCustomControl).
Why not use a TUpDown instead? It works well with edit controls.
Gambit
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03
|
|
|
| Back to top |
|
 |
Gnum Guest
|
Posted: Sun Sep 07, 2003 11:02 pm Post subject: Re: Placing button inside Edit |
|
|
May be not "inside" but "aside" ?
You should better create new control that contains of
TEdit and TSpin or whatever...
calss TMyControl : public TWinControl
{
private:
TEdit* Edit;
TUpDown* UpDown;
. . .
...so on...
}
What's wrong with this way?
Gnum
"Boyan" <nikolicspamoffbojan (AT) hotmail (DOT) com> wrote
| Quote: | Hi
Yes, I know about TUpDown,
But I want to create my own spinedit (and to learn this) and to have
buttons
inside Edit and then in future to add something more.
Boyan.
"Remy Lebeau (TeamB)" <gambit47 (AT) yahoo (DOT) com> wrote in message
news:3f59282a$2 (AT) newsgroups (DOT) borland.com...
"Boyan" <nikolicspamoffbojan (AT) hotmail (DOT) com> wrote in message
news:3f59264c (AT) newsgroups (DOT) borland.com...
I want to make some kind of spin edit, and I have one
TEdit (main control) and TSpinButtons (TCustomControl).
Why not use a TUpDown instead? It works well with edit controls.
Gambit
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ([url]http://www.grisoft.com)[/url].
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/03
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|