BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Placing button inside Edit

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development)
View previous topic :: View next topic  
Author Message
Boyan
Guest





PostPosted: Sat Sep 06, 2003 12:11 am    Post subject: Placing button inside Edit Reply with 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
Boyan
Guest





PostPosted: Sat Sep 06, 2003 12:15 am    Post subject: Re: Placing button inside Edit Reply with quote



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





PostPosted: Sat Sep 06, 2003 12:20 am    Post subject: Re: Placing button inside Edit Reply with quote




"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





PostPosted: Sat Sep 06, 2003 12:34 am    Post subject: Re: Placing button inside Edit Reply with 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

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





PostPosted: Sun Sep 07, 2003 11:02 pm    Post subject: Re: Placing button inside Edit Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Development) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.